Question: Can you please write SQL following queries based on below ER diagram ( Assume you have already created DB tables )? 1. Which cars have
Can you please write SQL following queries based on below ER diagram (Assume you have already created DB tables)?
1. Which cars have never been rented out? List the details that include the cars registration number, make and model, number of seats, manufactured year, category as well as the daily hire rate. 2. How many bookings have been processed by each employee? Show the employees name, working location and the number of bookings processed. Order the list so that the employee who processed the most bookings appear first. 3. Find out the customers who made bookings for a minivan. This includes customers name, phone and the booking date. 4. Find out the rental activities that have the most expensive cost. This includes the customer names, car registration numbers, make and models, start hire dates, end hire dates and the costs. 5. Show details of all rental activities. These details include customer name, pick up location, drop off location, start hire date, end hire date and the cost.
Assignment 1 Sample Solution ER model QRentals database system LOCATION Location Name Address Pick upDrop off CAR INSURANCE RENTAL Full Name BirthDate Address/Phone StartDate End Date [Cost] Make&Model NumOfSeats ManufacturedYear Carlmage PolicyN InsurerName Premium StartDate ExpiryDate CustomerType Associated Belong to Cust Type" BOOKING VEHICLECATEGORY CategoryID CategoryName Daily hire rate Description CORPORATE INDVIDUAL OrgnizationName ABN Personal Life Insured Travel special deal Process EMPLOYEE FullName BirthDate Phone SkillLevel AnnualSalary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
