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
What is lock escalation and what is its purpose?
What is a domain constraint give an example?
Can you import Microsoft Excel data to SSRS?
How to connect to a sql server using odbc_connect()?
Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.
What do you understand by a view?
do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
How to replace null values in expressions using isnull()?
What happens if strings are casted into wrong code pages in ms sql server?
Differentiate between mongodb vs. Sql server?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
Can you explain powershell included in sql server 2008?
How do you handle datasets larger than 50 gb?
How can you check the level of fragmentation on a table?
How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?