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 to include date and time values in sql statements?

812


What is SQL Azure Fabric?

106


What is the purpose of the tempdb database?

754


Can we call future method from queueable?

757


Can you explain different types of joins?

710






What is the fillfactor concept in indexes?

725


How do I get to sql server configuration manager?

695


How will you add a dimension to cube? : sql server analysis services, ssas

750


What is a coalesce function?

843


Explain how does the report manager work in ssrs?

705


What do you understand by mirroring?

746


What does null mean?

755


What new data source types were added in ssrs 2014?

130


What is auditing in sql server?

688


Why it is recommended to avoid referencing a floating point column in the where clause?

705