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

Can variables be used in sql statements?

1031


What are the different sql languages?

1035


Can we create table inside stored procedure?

955


Which are the different case manipulation functions in sql?

1023


What is the purpose of normalization?

1040


How many sectors are in a partition?

1076


What are the constraints available in sql?

1047


What are the different schemas objects that can be created using pl/sql?

1028


How do I pipe the output of one isql to another?

1004


List the various privileges that a user can grant to another user?

1043


What does select top 1 do in sql?

1094


What is data modelling in sql?

1017


Can sql function call stored procedure?

1022


Is foreign key mandatory?

1003


What operating systems are supported by oracle sql developer?

965