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 security features are available for stored procedure?
What is buffer cash in sql server?
What are built in functions?
What is a non equi join?
What is master database? : SQL Server Architecture
Is oracle faster than sql server?
How to configure and test odbc dsn settings?
What is collation?
how to invoke a trigger on demand? : Sql server database administration
Which sql server table is used to hold the stored procedure script?
How to add code to the existing article (using improve article)?
Is it possible to call a stored procedure within a stored procedure?
What are the different types of replication you can set up in sql server?
What is a cursor, index in sql?
How to use the inserted and deleted pseudo tables?