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 / purushotham
SELECT PROD_CODE ,COUNT(1) FROM TFT_P_PROD WHERE
BRCH_CODE='784'
GROUP BY PROD_CODE;
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Can variables be used in sql statements?
What are the different sql languages?
Can we create table inside stored procedure?
Which are the different case manipulation functions in sql?
What is the purpose of normalization?
How many sectors are in a partition?
What are the constraints available in sql?
What are the different schemas objects that can be created using pl/sql?
How do I pipe the output of one isql to another?
List the various privileges that a user can grant to another user?
What does select top 1 do in sql?
What is data modelling in sql?
Can sql function call stored procedure?
Is foreign key mandatory?
What operating systems are supported by oracle sql developer?