Question
I'm not sure about my answers for the following questions. I have included my answers as picture attachments except for 10 which I have not
I'm not sure about my answers for the following questions. I have included my answers as picture attachments except for 10 which I have not been able to solve. Could you let me know if I'm doing it right?
2. Find all the players whose total points are greater than 10. Show all the attributes of these players.
5. Find the total number of TimePeriodInHour of trainning that this player has trained .
6. Find the players who failed an e.x.a.m (i.e. note that the TestResult was changed to a boolean. NowTestResult=Fail). Show all of their information.
8.Find all the player IDs who were assigned a training that needs more than 40 hours and have not played a game yet.
9. Find all the player IDs who were assigned a training that needs more than 40 hours and have not played a game yet
10. Show player IDs who have the highest total Trainingtime
----------SCHEMA---------------
Player (ID: integer, Name: varchar(64), Birthday: date, Address: varchar(128), Email: varchar(32), PhoneNumber: char(10), PlayPos: varchar(16))
Manager (ID: integer, LoginID: varchar(16), Name: varchar(64), Password: varchar(8), Birthday: date, Address: varchar(128), Email: varchar(32), PhoneNumber: char(10))
Staff (ID: integer, Name: varchar(64), Birthday: date, Address: varchar(128), Email: varchar(32), PhoneNumber: char(10), Title: varchar(16))
ManagerCertificate (ManagerID: integer, CertificateId: int, Certificate: blob)
- Foreign key: ManagerID references Manager(ID)
Doctor (Email: varchar(32), Name: varchar(64), PhoneNumber: char(10))
TakeE.x.a.m (PlayerID: integer, DocEmail: varchar(32), TestDate: date, TestResult: varchar(256))
- Foreign key: PlayerID references Player(ID)
- Foreign key: DocEmail references Doctor(Email)
Stats (PlayerID: integer, Year: char(4), TotalPoints: integer, ASPG: integer)
- Foreign key: PlayerID references Player(ID)
Training (TrainingName: varchar(256), Instruction: varchar(256), TimePeriodInHour: integer)
AssignTraining (PlayerID: integer, ManagerID: integer, TrainingName: varchar(256))
- Foreign key: PlayerID references Player(ID)
- Foreign key: ManagerID references Manager(ID)
- Foreign key: TrainingName references Training(TrainingName)
Game (GameID: integer, Date: date, Result: varchar(16), PlayingVenue: varchar(256), OpponentTeam: varchar(32))
Play (PlayerID: integer, GameID: integer)
- Foreign key: PlayerID references Player(ID)
- Foreign key: GameID references Game(GameID)
Player.ID-Stats.PlayerIDAStats.TotalPoints>10(Player Stats) Player.ID-Stats.PlayerIDAStats.TotalPoints>10(Player Stats)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started