Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

if we have a column (Key) in a table.
and values of that column is
Key
1
1
1
2
2
3
3
4
4
5
5
5
and we want to show the data after query..like..

1(3)
2(3)
3(2)
4(2)
5(3)
how many times a single term comes..

Answer Posted / krishna reddy l

select convert(varchar(5),ex)+'('+convert(varchar(5),count
(ex))+')' from example group by ex
Table name example and columna name ex

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you find out how many rows returned in a cursor?

1031


What are the advantages of paper records?

970


Explain aggregate functions?

1086


Where in ms sql server is ’100’ equal to ‘0’?

1092


How many levels of sp nesting is possible?

1057


How data can be copied from one table to another table?

951


How to populate a table in sql server?

965


Define constraints and give an example of their use?

1041


Why we should not use triggers?

964


how to overcome kernel isssues

1629


Tell me about builtinadministrator?

1001


Do you know what is replace and stuff function in sql server?

1023


What happens if null values are involved in datetime operations?

976


Does partitioning improve performance sql server?

983


Can two different columns be merged into single column? Show practically?

1066