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 / rakesh prasad
In Sql server 2005
select col + '('+ cast (count(col)as varchar(1000))+')'from
tablename group by col
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is star, snowflake and star flake schema? : sql server analysis services, ssas
Why do you need a sql server?
What are the rendering extensions of ssrs?
What are the different types of sql server replication? : sql server replication
What is partitioned view?
What is row_number () and partition by in sql server?
Explain indexed views and partitioned view with their syntax.
Do you know what is bit data type and whats the information that can be stored inside a bit column?
Do you know what is difference between stored procedure and user defined function?
What are the 7 disadvantages to a manual system?
What is wrong with sql server client libarary dll, ntwdblib.dll?
What are the differences between union, intersect, and minus operators?
What stored by the msdb? : sql server database administration
Explain primary key?
What are scheduled tasks in sql server?