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 / krishna reddy l
select convert(varchar(5),ex)+'('+convert(varchar(5),count
(ex))+')' from example group by ex
Table name example and columna name ex
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can you find out how many rows returned in a cursor?
What are the advantages of paper records?
Explain aggregate functions?
Where in ms sql server is ’100’ equal to ‘0’?
How many levels of sp nesting is possible?
How data can be copied from one table to another table?
How to populate a table in sql server?
Define constraints and give an example of their use?
Why we should not use triggers?
how to overcome kernel isssues
Tell me about builtinadministrator?
Do you know what is replace and stuff function in sql server?
What happens if null values are involved in datetime operations?
Does partitioning improve performance sql server?
Can two different columns be merged into single column? Show practically?