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
Where is localdb stored?
What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?
Can you edit the .rdl code associated with a linked report?
What does the not null constraint do?
Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?
Explain about SQL server 2005?
What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?
Explain the microsoft sql server delete command? : SQL Server Architecture
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
Can you please explain the difference between primary keys and foreign keys?
What is the chart in report?
Explain left outer join and right outer join?
What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?
What do you mean by normalisation?
Explain where clause?