0 votes
in Computer by (77.6k points)
edited by

Table "Sports" is shown below. Write statements in SQL for (i) to (iv) and output for (v) and (vi)

                         Table: Sports

S101Anisha ThakurF2015-09-12Badminton34000
S102tipti SalujaF2015-08-12Lawn Tennis50000
S103Divya SharmaF2015-11-01Badminton55000
S104FauziaZarF2015-12-09Lawn Tennis60000
S105Richard DesouzaM2015-12-10Cricket50000

(i) To display all details of Students who have enrolled for 'Badminton' coaching.

(ii) To display names of girl students who have enrolled for 'Lawn Tennis'.

(iii) To display names of students, game enrolled, fee in ascending order of fee being paid by them.

(iv) To game name and number of students enrolled in each game.

(v) SELECT Name, Game, Fee FROM Sports WHERE Fee BETWEEN 50000 AND 60000.

(vi) SELECT Name, DateAdmit FROM Sports WHERE DateAdmit < '2015-12-09'.

1 Answer

+1 vote
by (75.7k points)
selected by
Best answer

(i) Select * From Sports Where Game like 'Badminton'.

(ii) Select Name from Sports where Gender =  'F' and Game = 'Lawn Tennis'.

(iii) Select Name, Game, Fee From Sports Order By Fee.

(iv) Select Game, Count (Studentld) from Group By Game.


Tipti SalujaLawn Tennis50000
Divya SharmaBadminton55000
Fauzia ZarLawn Tennis60000
Richard DesouzaCricket50000

(vi)   Name                        DateAdmit

       Tripti Saluja                 2015-08-15

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.