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 happens to a trigger with multiple affected rows?
What is explicit mode in sql server?
What are the instances when triggers are appropriate?
which table keeps the locking information? : Sql server administration
Write the syntax for stuff function in an sql server?
Why functions are used in sql server?
What does COMMIT command do?
What is conditional split?
Can you explain what is sql server english query?
What is trigger in salesforce?
What is Cross Join and in which scenario do we use Cross Join?
Is mysql the same as sql server?
How do you size a resultset?
Does partitioning improve performance sql server?
What is clustered vs nonclustered index?