sql 1
sql 1
Table:SBOP
2. Table:Exam
Ad. No SName Percentage Class Stream
R001 Sushant 90.2 12A Science
R002 Vaidyanath 80.5 12B Humanities
R003 Maira 68.9 12B Science
R004 Nihal 96.0 12A Commerce
R005 Ruhan 88.9 12B Commerce
R006 Aakash 87.0 12B Science
R007 Reema 75.2 12C Humanities
3.Table: CLUB.
Coach-id CName Age Sports DOA Pay Gender
1 Siya 24 Karate 27-03-2018 1000 F
2 Ravina 34 Karate 20-01-2018 1200 F
3 Karan 34 Squash 19-02-2019 1900 M
4 Shagun 33 Basketball 01-01-2018 2000 F
5 Keshav 36 Swimming 12-01-2019 800 M
6 Zubin 29 Swimming 24-02-2019 750 M
7 Aashi 39 Squash 20-02-2019 2100 F
8 Kush 37 Karate 22-02-2018 1000 M
9 Tarun 28 Swimming 13-01-2019 1100 M
10 Zareen 37 Basketball 18-02-2019 1700 F
Î) To display total amount paid by coaches of swimming and
squash.
>> SELECT SUM(Pay) FROM CLUB WHERE Sport=’swimming'
or sport=’sqaush’;
Iii) To display the Name , sports and pay of coaches who paid
more than 1500 in ascending order of names.
>>> SELECT CName, sports, pay FROM CLUB WHERE Pay
>1500 order by CName asc;