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 convert(varchar,id) + '(' + CONVERT(varchar,count
(id)) + ')' as tot from tblname group by id
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I find the transaction log size in sql server?
How extra digits are handled with numeric data type literals?
What is bulkcopy in sql?
How do you migrate data from mssql server to azure?
What is temporary table in sql server? Why we use temp table?
What is cross join in sql server joins?
Explain contrast amongst grouped and non-bunched records?
Is sql server is free?
When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?
Can you tell me about the concept of ER diagrams?
What are click through reports?
What is postgresql server?
can SSRS reports Cache results?
what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration
What are the types of processing and explain each? : sql server analysis services, ssas