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 / hanamesh havale

select top 10 cast(key as varchar)
+ '(' + cast(count(key) as varchar) + ')'
from TableName
group by key


Hanamesh Havale
Influx Infotech

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain magic tables in sql server?

1103


What are the advantages of policy management?

1043


What is a print index?

933


How to list all login names on the ms sql server?

1184


Tell me what is a linked server?

1086


What is compression - row-level and page-level compression?

962


Tell me about pre-defined functions of sql?

1158


Please explain what is “asynchronous” communication in sql server service broker?

980


Do you know how to implement service broker?

967


What is difference between views and stored procedures?

1029


Why use sub query in sql server and list out types of sub queries?

1055


How to join two tables in a single query in ms sql server?

1058


Explain an incremental backup?

1050


Tell me about the approaches which you used to counter the DI problems.

1427


Explain aggregate functions?

1139