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 trigger in sql?

1156


How does postgresql compare to oracle/db2/ms sql server/informix?

1094


How to get list of all tables from a database?

1212


How is use pl and sql?

1109


What is the difference between local and global temporary table?

1089


What is a table?

1061


How to use transactions efficiently : transact sql

1116


Why do we need pl sql?

1037


What is pragma in sql?

1128


How to pipe multiline string to isql?

1054


How exception handling is done in advance pl/sql?

1024


What is the use of function "module procedure" in pl/sql?

1240


what is sp_pkeys? : Transact sql

1206


What is a field in a database?

1104


How do I restart sql?

1027