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 / madhu sudhan g
Hiiiii
Lets the table name is No1 having column A is of int data Type
Now the query is
select convert(nvarchar(5),A) + '(' +
convert(nvarchar(5),count(1))+')' from NO1 GROUP BY A
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to connect sql server management studio express to sql server 2005 express?
What is normalization? Explain its different types?
What is instead of trigger sql server?
Tell me the use of keyword with encryption. Create a store procedure with encryption?
how to use DTS package in 2000,2005,2008 in sql server
Explain filestream storage of sql server 2008?
What is pivot and unpivot?
Is the primary key column of a table an index in ms sql server?
What is tempdb database? : SQL Server Architecture
What is cube dimension? : sql server analysis services, ssas
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
What is NOT NULL Constraint in sql server 2012?
What is the tcp/ip port on which sql server runs?
Does transparent data encryption provide encryption when transmitting data across the network?
What is a virtual table in sql?