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 pl sql block in dbms?

990


Is there a 64 bit version of ssms?

942


What does fetching a cursor do?

1066


Differentiate between syntax and runtime errors.

1164


How do I clear the screen in sql plus?

1028


Is oracle sql free?

968


Is inner join same as self join?

1107


What are different methods to trace the pl/sql code?

1093


how to do backup entire database? : Transact sql

1108


what are enums used for in mysql? : Sql dba

1154


What does over partition by mean in sql?

957


What is on delete set null?

1070


Show the two pl/sql cursor exceptions.

1164


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

983


Explain what is dbms?

1038