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 / javamaster
select key,count(key) from tablename
group by key order by key
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is use of attribute hierarchy optimized state? : sql server analysis services, ssas
What is meant by referential integrity?
What are alternate keys?
Why use sub query in sql server and list out types of sub queries?
What is an identity?
Tell me what is a linked server?
What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?
Is sql server free?
Define self join in sql server joins?
Is it important for a database administrator to understand the operating system and file access?
Does partitioning improve performance sql server?
Explain the concept of view and Types of views in SQL server?
What are different types of statements that are supported by sql?
List all the types of user-defined functions?
What are the different SQL Server Versions you have worked on?