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
How to recreate an existing index in ms sql server?
You want to check the syntax of a complicated update sql statement without executing it. What command should you use?
How to use subqueries with the exists operators in ms sql server?
What is query processing?
what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration
How to rebuild master databse?
Explain trigger classes i.e. Instead of and after trigger?
What are the five characteristics of good data?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
In what three ways is the return statement used in a stored procedure?
How to download microsoft sql server 2005 express edition?
Which rendering formats are affected by the pagesize properties?
Do you know what are different types of replication in sql server?
How dts is used to extract, transform and consolidate data?
Explain DBCC?