Question
Reservation ReservationID CustomerID VehicleID Start Date Return Date 798798 56544 4878 1/20/20 1/21/20 878899 56555 4666 1/15/20 1/27/20 987777 56578 4533 1/16/20 1/19/20 896674 56577
Reservation | ||||
ReservationID | CustomerID | VehicleID | Start Date | Return Date |
798798 | 56544 | 4878 | 1/20/20 | 1/21/20 |
878899 | 56555 | 4666 | 1/15/20 | 1/27/20 |
987777 | 56578 | 4533 | 1/16/20 | 1/19/20 |
896674 | 56577 | 4202 | 1/18/20 | 1/21/20 |
849456 | 56588 | 4989 | 1/19/20 | 2/5/20 |
489898 | 56511 | 4263 | 1/20/20 | 2/6/20 |
Inventory | ||||
VehicleID | Make | Model | Year | Color |
4878 | Ford | Taurus | 2019 | Silver |
4666 | BMW | X5 | 2020 | Black |
4533 | Honda | Accord | 2019 | Grey |
4202 | Honda | Civic | 2018 | Yellow |
4989 | Toyota | Prius | 2019 | Red |
4263 | Toyota | Prius | 2020 | Grey |
4898 | Toyota | Prius | 2018 | Silver |
Please provide the SQL (or T-SQL) statements (in your preferred syntax) |
1.A customer calls and asks how many Toyota Prius's the Car Rental Store has in inventory.
2.A customer calls and asks if the Car Rental Store will have any cars available on January 20th, which cars are available?
3.A customer returns VehicleID 4898 totalled and now the Car Rental Store must remove it from the inventory. 4.The corporate office sends the Car Rental Store a new car to add to its inventory, a 2020 red BMW X7. Hint: The sequence name is 'Vehicle_Seq' |
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