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
Is sql the best database?
What are the three forms of normalization?
Which function is used to return remainder in a division operator in sql?
Is a secondary key the same as a foreign key?
Why do we use sql constraints?
What are the different type of joins in sql?
How do I view an execution plan in sql?
How do you modify a table in sql?
What is group by in sql?
What is sqlite format?
Define select, insert, create, delete, update, drop keywords
What are character functions in sql?
Where the sql database files are stored?
how many tables will create when we create table, what are they? : Sql dba
Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?