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

Why do we need normalization?

919


Does the order of columns in update statements matter?

909


What is serializable?

1034


What are different types of subquery?

1232


Explain about sql server login?

1073


What are the types of subquery?

1034


Explain the ways to controlling cursor behavior?

911


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

1669


What is trigger explain with program?

971


What are “lost updates”?

988


What is the fillfactor concept in indexes?

972


What is sub-query in sql server? Explain its properties.

1082


What are the different subsets of sql?

1537


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

1379


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

1194