CBSE Class 12 Informatics Practices
Question 37 of 44
Solved 2025 Sample Question Paper CBSE Class 12 Informatics Practices (065) — Question 6
Back to all questions 6
Question Consider the following tables:
Table 1:
ATHLETE, which stores AthleteID, Name, Country. The table displays basic information of the athletes.
Table 2:
MEDALS, which stores AthleteID, Sport, and Medals. The table displays the number of medals won by each athlete in their respective sports.
Table: ATHLETE
| AthleteID | Name | COUNTRY |
|---|---|---|
| 101 | Arjun | INDIA |
| 102 | Priya | INDIA |
| 103 | Asif | UAE |
| 104 | Rozy | USA |
| 105 | David | DENMARK |
Table: MEDALS
| AthleteID | Sport | Medals |
|---|---|---|
| 101 | Swimming | 8 |
| 102 | Track | 3 |
| 103 | Gymnastics | 5 |
| 104 | Swimming | 2 |
| 105 | Track | 6 |
Write appropriate SQL queries for the following:
I. Display the sports-wise total number of medals won.
II. Display the names of all the Indian athletes in uppercase.
III. Display the athlete name along with their corresponding sports
I.
SELECT Sport, SUM(Medals)
FROM MEDALS
GROUP BY Sport;II.
SELECT UPPER(Name)
FROM ATHLETE
WHERE Country = 'INDIA'; III.
SELECT Name, Sport
FROM ATHLETE A, MEDALS M
WHERE A.AthleteID= M.AthleteID;