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 / devraj
Table Str:- create table T
( COL1 NUMBER(2));
Data:- select * from t;
col1
1
1
1
2
2
3
3
4
4
5
5
5
Query:-
Select col1 || '(' || Count(col1) || ')' From t Group By
col1;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is candidate key with example?
How to end a stored procedure properly in ms sql server?
What do you mean by collation recursive stored procedure?
Explain what is the main purpose of having conversation group?
Describe in brief authentication modes in sql server.
Explain having clause and where clause?
What is a linked server in sql server?
How much is a sql server license?
What is a full text index?
What are the new scripting capabilities of ssms? : sql server management studio
what is dbcc? : Sql server database administration
What do you mean by authentication modes in sql server?
In what version of sql server were synonyms released?
What are the different editions available in sql server 2000?
Why we need sql server?