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 / neeraj
If the column name is key
select key,count(*) from jojo
group by key
simple
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the recursive stored procedure in sql server?
I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that
What are logical database components? : SQL Server Architecture
How to Insert multiple rows with a single insert statement?
what does the automatic recovery do? : Sql server administration
what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration
What is the beast way to write CTE in SQL Server ?
How to list all schemas in a database?
What is constraints and its types?
Explain Geometry datatype in sql server 2008 with example
What is the difference between stored procedure and functions?
Explain triggers?
What is the difference between a local and a global temporary table?
List the different index configurations possible for a table?
What is a rollup clause?