SQL · Boston Consulting Group · Medium
The schema below models a car dealership. models(model_id, model_name) lists the vehicles on offer, customers(customer_id, customer_name, country) lists the buyers, and orders(order_id, order_date, customer_id, model_id, qty, unit_price, status) records individual purchases. The revenue of a single order is $$\text{qty} \times \text{unit\_price}$$. Treat the current date as 2025-07-15. The current window therefore spans 2025-07-09 through 2025-07-15 inclusive, and the prior…
Checking your access…