Back to problems

Write SQL for car rental utilization by city

SQL · Meta · Hard

Consider the relational schema of a vehicle-rental company, spread across four tables. user — holds only user_id. location — holds location_id together with the city where the branch is located. car — holds car_id, a car_size category (values such as compact, midsize, or suv), the location_id of the branch where the vehicle is garaged, and an is_active flag that equals 1 when the vehicle belongs to the current fleet. fct_rental — holds rental_id, the car_id that went out,…

Checking your access…