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 / sagar more

select replace(wm_concat(key||''||'('||count(*)||')' ),',','') key from drop1
group by key

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are sql servers used for?

727


What is the difference between value type and reference type?

712


What is the difference between function and stored procedure in sql server?

689


What is the stuff and how does it differ from the replace function?

740


What is multi-statement table-value user-defined function?

732


What is a table called, if it has neither cluster nor non-cluster index? What is it used for?

806


How efficient you are in oracle and SQL server?

817


Why are sql functions used?

780


What are the types of ssrs?

127


What are the advantages to use stored procedures?

794


What do you know about normalization and de- normalization?

643


How to find table changes in sql server?

831


Which is the latest version of sql server and when it is released?

754


What is a result set object returned by odbc_exec()?

733


Is it ok to shrink transaction log?

706