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
what is a self join? Explain it with an example? : Sql server database administration
how we use window authentication connection with sql server.?
How to use wildcard characters in like operations in ms sql server?
What are partitioned views?
How to skip remaining statements in a loop block using continue statements?
Can we join two tables without primary key?
How to use old values to define new values in update statements in ms sql server?
How do you identify a foreign key?
How do I view a procedure in sql server?
What is ddl command?
when you create a database how is it stored? : Sql server database administration
Explain how dts is used to extract, transform and consolidate data?
Is truncate autocommit?
What is use of except clause? How does it differ from not in clause?
What is the index requirement in SQL Azure?