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
OPTIMIZATION OF SP,CURSOR,TRIGGERS
How to create a view with data from multiple tables?
How to deploy the Report?
How do you clear a log file?
How to insert data with null values?
Using the customer, and order table in northwind database, please write a query to produce xml?
What the difference between UNION and UNIONALL?
Difference between Inner vs outer joins?
How to use user defined functions in expressions?
What is the difference between writing data to mirrored drives versus raid5 drives
Can sql server 2016 run on windows 7?
How many replicas are maintained for each sql azure db?
Can we deploy SSRS reports on our personal website?
Do you think BCNF is better than 2NF & 3NF? Why?
What protocol does sql server use?