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
Define synonym?
Explain few examples of stored procedure over triggers?
Explain what are commit and rollback in sql?
Some queries related to SQL
How to download microsoft sql server 2005 express edition?
What is the federation in sql azure?
How to write a query with a left outer join in ms sql server?
Why I am getting "the microsoft .net framework 2.0 in not installed" message?
What are the different types of upgrades that can be performed in sql server?
You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?
What is a benefit of using an after insert trigger over using a before insert trigger?
What do we have to check in database testing?
What are the triggers in sql?
how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A
What is scheduled job and how to create it?