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

Can you force a query to use a specific index?

886


What is the tcp/ip port on which sql server runs?

1055


What is 4nf in normalization form?

950


Explain how many types of relationship?

971


What is etl - extraction, transformation, and loading?

856


What is data compression?

938


Can primary key be null?

878


you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration

919


What is difference between rownum and rowid?

855


How do I run a trace in sql server?

928


What is global temp table?

944


How to create a new schema in a database?

1072


How to return the top 5 rows from a select query in ms sql server?

1072


What is the difference between osql and query analyzer?

938


What are different types of table joins?

960