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 methods do you follow to protect from sql injection attack?
Explain in brief about Microsoft SQL server?
What is the minimum recommended amount of ram for sql server 2012 enterprise?
What is the recovery model?
What are partitioned views and distributed partitioned views?
How many types of database relationship in sql server?
Differentiate between a primary key and a unique key.
What are orphan records?
What is partitioned view?
What is a view and what are its advantages?
Explain what is scheduled job and how to create it?
What is raiseerror? What is raiseerror?
How to check parameter value in stored procedure sql server?
Explain logical operators in sql server?
What is cross join in sql server joins?