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
Explain the rollback statement?
What is the maximum database size for sql express?
I need a function for a train ticket reservation please answer it thanks in advance
What is a rank in sql?
what is the difference between char_length and length? : Sql dba
What is the life of an sql statement?
What is substitution variable in pl sql?
what does the t-sql command ident_incr does? : Transact sql
What is difference between cursor and trigger?
Explain how can you save or place your msg in a table?
What is the trigger in sql?
Can we join same table in sql?
What is faster join or subquery?
Explain locks? : Transact sql
Explain aggregate functions are available there in sql?