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 will you find out if there are expensive SQL statements running or not?
How do you delete duplicate records in sql server?
Explain how to send email from sql database?
Can multiple columns be used in sql group by clause in ms sql server?
Suggest a method of joining two tables.
Explain why variables called the most powerful component of ssis?
List the data types available in mssql?
What is log ldf?
What is difference between after and before?
What is default constraint in ms sql server?
What is subquery explain with example?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.
What is rolap and its advantage? : sql server analysis services, ssas
What is microsoft sql server?