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 / vikas kant
select key,count(key1) from [table_name]
group by key
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the common performance issues in sql server?
You want to implement the one-to-many relationship while designing tables. How would you do it?
What is the difference between upgrade and migration in sql server?
What extended events?
What is the recovery model? List the types of recovery model available in sql server?
Can coalesce return null?
In which tcp/ip port does sql server run? Can it be changed?
Where are sql server usernames and passwords stored in the sql server?
What does COMMIT command do?
Describe different Processing Modes offered by SSRS?
Why use triggers?
What is inline table-value user-defined function?
what are defaults? : Sql server database administration
How does Report Builder support Analysis Services cubes?
When columns are added to existing tables, what do they initially contain?