Computer Science, asked by samarshrivastava2004, 11 months ago

Create the following table Sports club and insert the given rows. Write SQL queries for
the following.
TABLE : Sports_club
playerid pname game price rating
1001 TOM Soccer 5000 A
1002 BOB Volleyball 5600 B
1003 JIM Basketball 6000 A
1004 SID Soccer 7000 C
1005 JOY Cricket 4500 A
1006 SAM Judo 8000 B
(i) Write SQL to display pname, game and price whose price in range 6000 to 8000
(ii) Write the SQL query to display details of A rated players
(iii) Write SQL query to display the pname and game for those players who either
play Soccer or Cricket or Judo.
(Note: Write Output of all Select Queries in the Answer Script)

Answers

Answered by anishasa
6

Answer:

i) SELECT pname, game,price FROM sports_club WHERE price BETWEEN 6000 AND 8000;

pname game             price

JIM         Basketball      6000

SID         Soccer             7000

SAM       Judo             8000

ii) SELECT * FROM sports_club WHERE rating='A';

playerid pname game     price rating

1001 TOM Soccer   5000 A

1003 JIM        Basketball 6000 A

1005 JOY       Cricket     4500 A

iii) SELECT pname,game FROM sports_club WHERE game='Soccer' OR game='Cricket' OR game='Judo';

pname game

TOM Soccer

SID         Soccer

JOY        Cricket

SAM Judo

Similar questions