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
How to generate create table script on an existing table in ms sql server?
How to connect of datebase with sql express.?
What is the current limitation of the size of SQL Azure DB?
Explain in brief about Microsoft SQL server?
How do I determine how many instances of sql server are installed on a computer?
How to rename an existing column with the "sp_rename" stored procedure in ms sql server?
Is null vs coalesce?
Where to find ntwdblib.dll version 2000.80.194.0?
what is raid? : Sql server database administration
How to create and drop temp table in sql server?
What is the most common type of join?
Where do we use trace frag?
How does Report Builder support Analysis Services cubes?
How many full-text indexes can a table have?
What is openxml in sql server?