Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / rajkumar v

select SNo, '(' + convert(varchar,count(SNo)) + ')' from
test group by SNo having COUNT(*)>=1

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain different types of joins? : Sql server database administration

988


How to create a simple table to test triggers in ms sql server?

979


how can a database be repaired? : Sql server administration

979


What number sorts of privileges are accessible in sql?

1037


what are the different ways to return the rowcount of a table?

1003


Explain iaas, paas and saas?

90


What is the purpose of linked server configuration in sql server?

1050


Find nth lowest salary or get nth lowest salary?

1029


When I delete any data from a table, does the sql server reduce the size of that table?

1022


How to fetch the next row from a cursor with a "fetch" statement?

1073


Can you index views?

896


What is check constraint in sql server?

1004


How to create function without parameter in sql server?

1060


What is difference between index and primary key?

1101


What is update locks?

893