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
What is sql stand for?
What does joining a thread mean?
What is synonyms?
How is data stored on a disk?
How do I start sql from command line?
Can I call a procedure inside a function?
What do you understand by pl/sql cursors?
What is mutating table error?
How do you explain an index?
How many parts of a pl sql block are optional?
What are the different sql commands?
What is nvl?
What is serial sql?
Is pl sql still used?
What is schema in sql example?