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 is transaction server implicit?

533


What is partitioned view?

523


When I run the sql server 2000 setup, it just hangs. What do I do?

648


what are the disadvantages of cursors? : Sql server database administration

494


Any one plz send me SQL Server Developer/DBA resume for 4 years experience

2174






How to create a local temporary stored procedure?

501


What sql server means?

557


write an SQL query to list the employees who joined in the month of January?

1148


Do I need a report server to run reports in my application?

106


What is best institute to Learn DotNET And SQL in chennai?

1688


Define outer join?

530


What is the downside of using udf?

557


How you can change the database name in SQL SERVER?

670


What command would you use to add a column to a table in sql server?

745


What is a transact-sql statement?

535