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...


Table name: T1, it has only one column.

col1
------
c
b
a
b
b
b
b
d
s
a
a
t
s


Requirement:

I need the following output from the above base table by
using SQL query.


col1 Cnt
----- -------
a 3
b 5
Others 5


Please help.

Thanks
Guru
v.gurus@in.com








Answer Posted / purushotham

SELECT PROD_CODE ,COUNT(1) FROM TFT_P_PROD WHERE
BRCH_CODE='784'
GROUP BY PROD_CODE;

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql stand for?

979


What does joining a thread mean?

1019


What is synonyms?

1056


How is data stored on a disk?

1025


How do I start sql from command line?

1021


Can I call a procedure inside a function?

1008


What do you understand by pl/sql cursors?

1085


What is mutating table error?

1175


How do you explain an index?

1281


How many parts of a pl sql block are optional?

1128


What are the different sql commands?

1067


What is nvl?

1063


What is serial sql?

972


Is pl sql still used?

973


What is schema in sql example?

1173