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 / manju

select key,count(key)as"count of items" from tablename
group by key order by key

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between primary key and unique constraints?

964


What is resource db in sql server?

1026


List the types of recovery model available in sql server?

928


How to start sql server browser service?

1136


What is cursors? And what are the different types of cursor?

1144


What programming language would you use to create embedded functions in ssrs?

184


Will the writetext statement activate a trigger?

1095


What is report snapshot in ssrs?

269


What is sql language?

1146


Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

1026


Can you import Microsoft Excel data to SSRS?

132


If we delete pack Spec what will be the status of pack Body ?

1476


Can group by and orderby be used together?

1015


Using the customer, and order table in northwind database, please write a query to produce xml?

1076


your distribution database is full what will u do

2172