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 / devraj

Table Str:- create table T
( COL1 NUMBER(2));

Data:- select * from t;
col1
1
1
1
2
2
3
3
4
4
5
5
5
Query:-
Select col1 || '(' || Count(col1) || ')' From t Group By
col1;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to convert a unicode strings to non-unicode strings?

1102


What is the difference between a unique key and primary key?

956


Does group by or order by come first?

958


Where cross join is used?

965


How to assign null values to variables or columns?

977


What is the tcp/ip port on which sql server runs?

1161


Why use “pivot” in sql server?

1119


What is a user-defined function in the sql server and what is its advantage?

1105


Why use identity in sql server?

1106


Define full outer join in sql server joins?

995


What samples and sample databases are provided by microsoft?

1038


What is the difference between ‘having’ clause and a ‘where’ clause?

1041


Explain how does the report manager work in ssrs?

957


If you want to send some data from access database to sql server database. What are different component of ssis will you use?

985


When a primary key constraint is included in a table, what other constraints does this imply?

989