Consider the table given below:
Table : STUDENT
|
ADM |
NAME |
CLASS |
|
1 |
Anshuman |
12A |
|
2 |
Arun Lal |
12C |
|
3 |
Sachin |
12A |
|
4 |
Kapil |
12B |
|
5 |
Sunil |
12A |
|
6 |
Virat |
12C |
Based on the above table, which command will give the following result:
|
CLASS |
No of students |
|
12A |
3 |
|
12C |
2 |
1
Select CLASS, Count(*) From STUDENT Group by CLASS;
2
Select CLASS, Count(*) 'No of students'
From STUDENT
GROUP by CLASS;
3
SELECT CLASS,COUNT(No of students)
FROM STUDENT
Group By CLASS
Having count(*)>1;
4
SELECT CLASS,COUNT(*) 'No of students'
FROM STUDENT
Group By CLASS
Having count(*)>1;