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
Why do we need normalization?
Does the order of columns in update statements matter?
What is serializable?
What are different types of subquery?
Explain about sql server login?
What are the types of subquery?
Explain the ways to controlling cursor behavior?
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 trigger explain with program?
What are “lost updates”?
What is the fillfactor concept in indexes?
What is sub-query in sql server? Explain its properties.
What are the different subsets of sql?
Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?
How many types of relations are there between dimension and measure group? : sql server analysis services, ssas