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

What is a print index?

693


What is blocking?

749


What is cursors? And what are the different types of cursor?

797


What is "scheduled jobs" or "scheduled tasks"?

749


Explain about temporary stored procedure?

702


How to list all login names on the ms sql server?

761


What are approximate numeric data types in ms sql server?

793


How to deploy the Report?

107


How to retrieve field values using mssql_result()?

857


How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?

800


Can I disable or restrict ssrs export formats (rendering formats)?

126


Explain can SSRS reports Cache results?

136


Can you roll back the ddl statement in a trigger?

742


Can we store videos inside the sql server table?

743


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

796