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 / hanamesh havale
select top 10 cast(key as varchar)
+ '(' + cast(count(key) as varchar) + ')'
from TableName
group by key
Hanamesh Havale
Influx Infotech
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is report server project?
What is bcp? When does it used?
What are drillthrough reports?
What is a select query statement in ms sql server?
How do I create an extended event in sql server?
What are the functions in sql server?
How real and float literal values are rounded?
How to get the definition of a stored procedure back?
What is the minimum recommended amount of ram for sql server 2012 enterprise?
Determine how to use the inserted and deleted pseudo tables?
Explain what are the events recorded in a transaction log?
What are the five characteristics of good data?
What is 1nf normalization form?
What is 5nf in normalization form?
Can you explain important index characteristics?