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 / manju
select key,count(key)as"count of items" from tablename
group by key order by key
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the 2 types of classifications of constraints in the sql server?
Explain the stored procedure?
Explain optimistic and pessimistic concurrency?
What is the Main Difference between ACCESS and SQL SERVER?
What is a self join in sql server?
Explain syntax for dropping triggers?
What is the cpu pressure?
What is the recommended total size of your memory optimized tables?
What is @@error in sql?
How to verify a user name with sqlcmd tool?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
What are the different index configurations a table can have?
What are diverse clauses that form a part of sql?
How to make conditional sum in ssrs?
you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration