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 / manas
select col1,count(*)cnt from T1 group by col1
Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What are the 3 modes of parameter?
Can we write ddl statements in functions?
Is null operator in sql?
What is native sql query?
What are the various levels of constraints?
What is localdb mssqllocaldb?
What does plv msg allows you to do?
what are the different index configurations a table can have? : Sql dba
Do stored procedures prevent sql injection?
What is cold data?
Explain ttitle and btitle.
When is the update_statistics command used?
Which are the different character-manipulation functions in sql?
What schema means?
Explian rowid, rownum? What are the psoducolumns we have?