[Assignments] Simple Queries in SQL — Chapter 12 Assignments (Q/A)

|
Table of Contents

13. Given the following table:
Give the output of following SQL statements:

COACH_IDCOACHNAMEAGESPORTSDATOFAPPPAYSEX
1KUKREJA35KARATE27.3.961000M
2RAVINA34KARATE20.1.981200F
3KARAN34SQUASH19.2.982000M
4TARUN33BASKETBALL1.1.981500M
5ZUBIN36SWIMMING12.1.98750M
6KETAKI36SWIMMING24.2.98800F
7ANKITA39SQUASH20.2.982200F
8ZAREEN37KARATE22.2.981100F
9KUSH41SWIMMING13.1.98900M
10SHAILYA37BASKETBALL19.2.981700M
Table : CLUB
  1. SELECT COUNT (DISTINCT SPORTS) FROM Club ;
  2. SELECT MIN(Age) FROM CLUB WHERE Sex = ‘F’ ;
  3. SELECT AVG(Pay) FROM CLUB WHERE Sports = ‘KARATE’ ;
  4. SELECT SUM(Pay) FROM CLUB WHERE Datofapp > ’31/01/98′ ;
COUNT(DISTINCT SPORTS)
4
MIN(AGE)
34
AVG(PAY)
1100
SUM(PAY)
7800
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *