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 do you create a clustered index?
Tell me what are cursors and when they are useful?
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
Explain difference between control flow and data flow?
How many types of triggers in sql server?
What is difference between temp table and cte?
How to count groups returned with the group by clause in ms sql server?
What is policy based management (pbm)? : sql server database administration
Explain the concept of recursive stored procedure.
How to display a past time in days, hours and minutes?
Difference between primary key and clustered index?
What is trigger in salesforce?
Describe in brief sql server monitoring ways.
What is ms sql server triggers?
Do you know what is lock escalation?