Problem
CAR(vin, plate, make, model, type, color, transmission, year)
CUSTOMER(id, name, address, city, age)
RENTAL(vin, cust-id, date, time-start, number-days, daily-rate)
Answer the following in Relational Algebra:
• Find pairs of cars (vin is ok) that have been rented by the same customer. The schema of the answer should be (vin1, vin2), where both attributes are re-namings of vin.
Answer the following in MySQL:
• List the number of rentals for each car color, but only if the number of rentals is more than 5.
• Find the vin, customer id and date of all rentals where the daily-rate is higher than the averagedaily-rate for all rentals.
• Find the vin and make of the car(s) that have the longest rentals (based on number-days). NOTE: you must account for ties.
• List the vin of all cars that are more than 10 years old but have been rented less than 50 times.