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 convert(varchar,id) + '(' + CONVERT(varchar,count
(id)) + ')' as tot from tblname group by id

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Would you store your query in a ssrs report or a database server? State the reason why?

152


what is a mixed extent? : Sql server administration

1110


What is the difference between a check constraint and a rule?

1256


How to list all login names on the ms sql server?

1146


how would you improve etl (extract, transform, load) throughput?

1033


What are the properties of the transactions?

1119


Can we delete data from a view?

930


Distinguish between commit and rollback?

968


How to delete existing triggers using "drop trigger"?

1059


List all the types of user-defined functions?

1103


Can we write ddl in trigger?

922


Explain trigger and its types?

1071


explain extended properties

997


How to provide login information for a new odbc dsn?

1052


Is it important for a database administrator to understand the operating system and file access?

1005