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 / rakesh prasad

In Sql server 2005

select col + '('+ cast (count(col)as varchar(1000))+')'from
tablename group by col

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many replicas are maintained for each SQL Azure database?

142


What are the commands used in DCL?

1019


What are 3 ways to get a count of the number of records in a table?

1071


What are the steps to follow to configure SQL*Net?

1029


What is the difference between index seek vs. Index scan?

1021


How to use “drop” keyword in sql server and give an example?

1126


Explain about unique identifier data type in sql server?

907


State a few properties of relational databases?

1120


What is user-defined multi-statement table-valued function?

1052


Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?

1000


Define left outer join in sql server joins?

955


What is implicit mode in sql server?

1097


Is ssrs support other database except ms sql server?

139


what happens on checkpoint? : Sql server database administration

1090


What are information schema views?

974