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 / manas

select col1,count(*)cnt from T1 group by col1

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between inner join and left join?

987


How delete all data from table in sql?

1005


What is a sql trace file?

1013


Why do we need sharding?

979


What does count (*) mean in sql?

1557


What is sql exception?

953


Explain the the delete statements in sql?

1043


explain access control lists. : Sql dba

982


How do I create a memory optimized filegroup?

948


What is delete command in sql?

1091


What are system versioned tables?

1011


Which kind of parameters cannot have a default value in pl sql?

1126


Can we use view in stored procedure?

889


Is progress software supports to ( pl/sql )?

1028


How many commands are there in sql?

1014