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
what is 'trigger' in sql? : Sql dba
how many sql ddl commands are supported by 'mysql'? : Sql dba
What are expressions?
Why commit is not used in triggers?
What is sap sql?
What is the syntax and use of the coalesce function?
Is pl sql and postgresql same?
tell us something about heap tables. : Sql dba
What is an ndf file?
Define select, insert, create, delete, update, drop keywords
explain about mysql and its features. : Sql dba
What is a left join?
How does sql*loader handles newline characters in a record? : aql loader
Should I use mbr or gpt?
Does sql full backup truncate logs?