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
How can you tell if a database object is invalid?
What is transactional replication?
If a stored procedure is taking a table data type, how it looks?
What is a covered index?
What is the cpu pressure?
What happens when converting big values to integers?
What is a partition function in sql server?
Find nth lowest salary or get nth lowest salary?
Explain the collation?
What is sql collation?
hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.
How to use transact-sql statements to access the database engine?
What is the rdl file?
what is a mixed extent? : Sql server administration
What are acid properties of transaction?