Advertisements
Advertisements
प्रश्न
Srikanth created the foollowing table STUDENT in his database.
Table: STUDENT
| RollNo | Name | Class | Marks |
| 1 | Ritika | 12 | 40 |
| 2 | Angad | 12 | 35 |
| 3 | Kaveri | 11 | 42 |
| 4 | Lalitha | 12 | 21 |
| 5 | Daniel | 11 | 44 |
| 6 | Rabindra | 11 | 39 |
| 7 | Rabia | 11 | 28 |
He now wants to count number of students in each class where the number of students is more than 3. He has executed the following query:
SELECT MAX (Marks) FROM STUDENT WHERE COUNT(*)>3 GROUP BY Class;
But, he got an error. Identify the error(s) and rewrite the query. Also underline the correction(s) done.
एका वाक्यात उत्तर
Advertisements
उत्तर
SELECT, COUNT(Name) FROM STUDENT GROUP BY Class HAVING COUNT(*)>3;
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
