Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

How is data stored on a disk?

166


What is difference between my sql and sql?

153


Differentiate between pl/sql and sql?

197


Can you select everything, but 1 or 2 fields, without writer's cramp?

172


Does truncate require commit?

161






What are some predefined exceptions in pl/sql?

186


what is the functionality of the function htmlentities? : Sql dba

173


Which are the different case manipulation functions in sql?

183


What is a boolean in sql?

157


What are pl sql procedures?

158


What is sql select statement?

156


Can you do multiple joins in sql?

171


What is row_number () in sql?

161


How do I create an index in word?

158


What is sorting in sql?

166