Hi, I'm looking for some help on forming a query to give me the following results:
1. I have two tables as: product, orders that have product_id as linked field.
2. Now I want to retrieve top 5 best selling products that are sold most. So I need to count the total number of records in orders table for each product and pick 5 best selling products. The query should return product_name and total quantity sold (record count).
Could someone help writing this query please?