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 / krishna reddy l

select convert(varchar(5),ex)+'('+convert(varchar(5),count
(ex))+')' from example group by ex
Table name example and columna name ex

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by mirroring?

952


What happens when converting big values to numeric data types?

1032


What are the properties of primary key?

915


What are different types of statements that are supported by sql?

984


How to delete duplicate records based on single column from a table?

998


What is the maximum size of column in sql server?

850


Define outer join in sql server joins?

892


What is Federation Root Database?

104


Where can you add custom error messages to sql server?

1055


How can we determine what objects a user-defined function depends upon?

952


When would you prefer to have a minimum number of indexes?

843


What are the new features of sql server 2008 r2 reporting service?

193


Explain relational data?

860


What are the fixed server level roles? : sql server security

1054


Define right outer join in sql server joins?

983