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

Question 32(B)

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

AthleteIDNameCOUNTRY
101ArjunINDIA
102PriyaINDIA
103AsifUAE
104RozyUSA
105DavidDENMARK

Table: MEDALS

AthleteIDSportMedals
101Swimming8
102Track3
103Gymnastics5
104Swimming2
105Track6

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

Answer

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;