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 / rajkumar.v

select convert(varchar,id) + '(' + CONVERT(varchar,count
(id)) + ')' as tot from tblname group by id

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the etl (extraction, transformation, and loading)?

958


What are different types of schemas?

907


How to test values returned by a subquery with the in operator?

1146


What are the diifferences between the ms sql server vs mysql?

1138


What’s the use of custom fields in report?

905


How to create percentile function?

145


What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?

873


What is database black box testing?

1001


What are various ways to enhance the ssrs report?

941


What is the most common trace flags used with sql server?

987


Is mysql better than sql server?

1024


What is field with example?

884


What is ddl command?

941


What is field in algebra?

999


How can we delete a table in sql server?

936