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 jobs use sql?

921


Explain the difference between cursor declared in procedures and cursors declared in the package specification?

1057


Explain what is a field in a database and record in a database?

1012


What is trigger in flip flop?

955


How to call a javascript function from pl sql?

1063


What is sql clause?

992


How do you change a value in sql?

960


What is server name sql?

1067


What is the size of partition table?

987


Why plvtab is considered as the easiest way to access the pl/sql table?

1127


How do you go back in sql?

939


Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints

1020


What is rowtype?

953


What if we write return in procedure?

1331


What are %type and %rowtype for?

1009