CBSE Class 12 Informatics Practices Question 69 of 90

Querying Using SQL — Question 9

Back to all questions
9
Question

Question 9

Table EXAM_RESULTS

STU IDFNAMELNAMEEXAM IDEXAM_SCORE
10LAURALYNCH190
10LAURALYNCH285
11GRACEBROWN178
11GRACEBROWN272
12JAYJACKSON195
12JAYJACKSON292
13WILLIAMBISHOP170
13WILLIAMBISHOP2100
14CHARLESPRADA285

What is the result of the following SQL statement ?

SELECT MAX(EXAM_SCORE) FROM EXAM_RESULTS GROUP BY EXAM_ID HAVING EXAM_ID = 1;
  1. 90
  2. 85
  3. 100
  4. 95
Answer
Output
+-----------------+
| MAX(EXAM_SCORE) |
+-----------------+
|              95 |
+-----------------+
Explanation

The above SQL query calculates the maximum exam score for EXAM_ID 1 from the EXAM_RESULTS table, by grouping results based on EXAM_ID and filtering using HAVING.