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 pl sql block in dbms?
Is there a 64 bit version of ssms?
What does fetching a cursor do?
Differentiate between syntax and runtime errors.
How do I clear the screen in sql plus?
Is oracle sql free?
Is inner join same as self join?
What are different methods to trace the pl/sql code?
how to do backup entire database? : Transact sql
what are enums used for in mysql? : Sql dba
What does over partition by mean in sql?
What is on delete set null?
Show the two pl/sql cursor exceptions.
Lookups are a key component in sql server integration services (ssis). Explain its purpose?
Explain what is dbms?