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
Give the order of sql select?
how to convert numeric values to character strings? : Sql dba
Can we insert data in view?
how to escape special characters in sql statements? : Sql dba
What is the need of a partition key?
What is the difference between an inner join and an outer join?
What is consistency?
What is varchar data type in sql?
What is spool?
What will you get by the cursor attribute sql%found?
Describe sql comments?
What are the basic techniques of indexing?
Which is better varchar or nvarchar?
What is minus?
Does sql support programming?