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
Write the alter statement to enable all the triggers on the t.students table.
Why partition by is used in sql?
What does select count (*) mean in sql?
What is the use of desc in sql?
What is auto increment feature in sql?
what are all the different normalizations? : Sql dba
What are pl/sql cursors?
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
How many types of sql are there?
Do prepared statements prevent sql injection?
What is a database event trigger?
What is bind variable in pl sql?
What is the trigger in sql?
What is the difference between jpql and sql?
What is query syntax?