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 are the disadvantages of indexes?

1095


Explain the functionalities that views support?

1124


Why are views required in the sql server or in any other database?

971


Describe in brief databases and sql server databases architecture.

1018


How to receive returning result from a query?

1133


What is msdb database? : SQL Server Architecture

1143


What are the different types of sql server replication? : sql server replication

1281


Can you please explain the difference between primary keys and foreign keys?

1125


Different types of keys in SQL?

1104


What are the purpose of Normalisation?

1059


Why should we go for stored procedures? Why not direct queries?

1107


Give an example of SQL injection attack ?

1014


Tell me what are cursors and when they are useful?

959


How to create a simple table to test triggers in ms sql server?

985


Give main differences between "Truncate" and "Delete".

1106