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 / madhu sudhan g

Hiiiii

Lets the table name is No1 having column A is of int data Type
Now the query is
select convert(nvarchar(5),A) + '(' +
convert(nvarchar(5),count(1))+')' from NO1 GROUP BY A

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between a local and a global temporary table?

938


What are the 3 types of schema?

1042


What are the drawbacks of reporting in ssrs?

141


Is it possible to replicate data from sql server to oracle? : sql server replication

1036


What is table constraint?

932


What is query cost in sql server?

937


what is the main function of a query parameter?

140


Explain ranking functions?

993


What is the command used to check locks in microsoft sql server?

975


Explain difference between control flow and data flow?

906


Does group by or order by come first?

900


What is user defined datatypes and when you should go for them?

965


Difference between drill down and drill through report.

900


How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?

161


How can sql injection be stopped? : sql server security

958