Find Top Customer by Year
HardUnlock detailed company stats for this questionUpgrade
You are given the following tables:
orders table:
departments table:
customers table:
For each of the last 5 years, identify the customer who placed the most orders, i.e. you should have a list of 5 top customers. Your output should have the following columns: year, customer_id, first_name, last_name, total_orders.
Example output: