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's the difference between inner join and left join?
How delete all data from table in sql?
What is a sql trace file?
Why do we need sharding?
What does count (*) mean in sql?
What is sql exception?
Explain the the delete statements in sql?
explain access control lists. : Sql dba
How do I create a memory optimized filegroup?
What is delete command in sql?
What are system versioned tables?
Which kind of parameters cannot have a default value in pl sql?
Can we use view in stored procedure?
Is progress software supports to ( pl/sql )?
How many commands are there in sql?