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 the use of count (*) in sql?
What is difference between sql and excel?
what are numeric data types? : Sql dba
What is difference between stored function and application function?
What is rollback?
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
What is normalization in sql?
what are the different type of normalization? : Sql dba
What is data modelling in sql?
What are aggregate functions in sql?
What is difference between cursor and trigger?
How many types of cursors supported in pl/sql?
Is sql better than access?
What are the types of sql commands?
what is myisam? : Sql dba