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 do I completely remove sql server instance?
How do I view a procedure in sql server?
List out a number of the wants to setup a SQL Server failover cluster?
What stored by the model? : sql server database administration
what method you can use to reduce the overhead of Reporting Services data sources?
What are the two modes of authentication in sql server?
What is data modification?
What is the tcp/ip port on which sql server runs?
Can a table be created inside a trigger?
Explain what is use of dbcc commands?
what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration
Why main is user defined function?
Which Model uses the SET concept
Can coalesce return null?
Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?