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

If the column name is key
select key,count(*) from jojo
group by key

simple

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can find out if an index is useful to the optimizer?

698


How do I view a stored procedure in sql server query?

756


What are recommended options to be used while using db mirroring? : sql server database administration

836


How to stop a loop early with break statements in ms sql server?

820


Explain different types of self contained sub query?

776


What are system databases into sql server (2005/2008)?

805


What is similarity and difference between truncate and delete in sql?

857


How many replicas are maintained for each sql azure db?

118


What is efficiency data?

770


How do you migrate data from mssql server to azure?

161


what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration

775


How do you test your database? : sql server database administration

775


What do you mean by normalisation?

730


 Explain what is sql override for a source taLle in a mapping?

803


What are logical database components? : SQL Server Architecture

724