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 jobs use sql?
Explain the difference between cursor declared in procedures and cursors declared in the package specification?
Explain what is a field in a database and record in a database?
What is trigger in flip flop?
How to call a javascript function from pl sql?
What is sql clause?
How do you change a value in sql?
What is server name sql?
What is the size of partition table?
Why plvtab is considered as the easiest way to access the pl/sql table?
How do you go back in sql?
Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints
What is rowtype?
What if we write return in procedure?
What are %type and %rowtype for?