A relational database is being developed to store information about the games that are box available to play at a games café and the advance bookings that have been made for those games. Each game has a unique name.
The database contains two tables: Game and Booking.
The database is currently being tested by the person who has developed it so the database tables only contain a small amount of data that is being used for testing.
The contents of the tables are shown in Figure 5.
Figure 5
Game
Name | MinPlayers | MaxPlayers | LengthOfGame | Complexity |
---|
Friday | 1 | 1 | 25 | 2.12 |
Scythe | 1 | 5 | 90 | 3.37 |
Terra Mystica | 2 | 5 | 100 | 3.95 |
Agricola | 1 | 4 | 90 | 3.31 |
Pandemic | 2 | 4 | 45 | 2.42 |
Booking
GameTableID | Name | Date | StartTime | Customer | Hours |
---|
1 | Friday | 28/05/19 | 11 | Hawkins | 1 |
2 | Scythe | 28/05/19 | 11 | Jemisin | 1 |
3 | Terra Mystica | 28/05/19 | 15 | Gormally | 1 |
1 | Agricola | 28/05/19 | 13 | Van Perlo | 2 |
1 | Pandemic | 28/05/19 | 15 | Hawkins | 2 |
Due to a change in layout at the café, the Game table with an ID of 2 is no longer suitable for games that can have more than four players. The manager needs to find out the customer, date and time of all bookings made for the game table with an ID of 2 that are for a game that can have more than four players.
Write an SQL query that could be used to find this information for the manager. The results should be shown in date order.