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 / rajkumar v
select SNo, '(' + convert(varchar,count(SNo)) + ')' from
test group by SNo having COUNT(*)>=1
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Sql server reporting services vs. Crystal reports.
how will add additional conditions in sql?
How to make conditional sum in ssrs?
How many clustered indexes there can be on table ?
Explain system views?
Define candidate key, alternate key, and composite key.
How do you handle datasets larger than 50 gb?
How can you append an identity column to a temporary table?
Explain what are page splits? : SQL Server Architecture
What does set rowcount do?
Do you know the cursor optimization tips?
What is transact-sql ddl trigger?
List the types of recovery model available in sql server?
What is page-level compression?
Please explain go command in sql server?