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 / sandhya
SELECT col1, count(*) cnt
FROM T1
GROUP BY col1
ODER BY col1
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is sql*loader?
what is sub-query? : Transact sql
What is bind reference and how can it be created?
What does varchar include?
What is database white box testing and black box testing?
What is a primary key called that is made up of more than one field?
what is unique key constraint? : Sql dba
Is sql a programming?
What is sql and explain its components?
What do you mean by field in sql?
What is a left inner join?
Write a query to find the names of users that begin with "um" in sql?
what is a composite key ? : Sql dba
How do I run pl sql in sql developer?
Explain the rollback statement?