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

Write the alter statement to enable all the triggers on the t.students table.

1132


Why partition by is used in sql?

1048


What does select count (*) mean in sql?

1025


What is the use of desc in sql?

984


What is auto increment feature in sql?

1131


what are all the different normalizations? : Sql dba

1054


What are pl/sql cursors?

1059


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

1230


How many types of sql are there?

996


Do prepared statements prevent sql injection?

956


What is a database event trigger?

1165


What is bind variable in pl sql?

1062


What is the trigger in sql?

966


What is the difference between jpql and sql?

1102


What is query syntax?

980