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

Give the order of sql select?

1089


how to convert numeric values to character strings? : Sql dba

1037


Can we insert data in view?

891


how to escape special characters in sql statements? : Sql dba

971


What is the need of a partition key?

942


What is the difference between an inner join and an outer join?

971


What is consistency?

1062


What is varchar data type in sql?

1016


What is spool?

993


What will you get by the cursor attribute sql%found?

901


Describe sql comments?

963


What are the basic techniques of indexing?

1014


Which is better varchar or nvarchar?

934


What is minus?

940


Does sql support programming?

1008