Write a SQL to meet my requirement.
- by rgksugan
I have been trying to solve this problem for a lot of days. But wouldn't. Please help me.
I need a SQL to list product_code, product_name, qty_sold, last_order_date for all the products that have been sold within a date range sorted by the number of quantity sold.
My Table structure:
tbl_product(product_id,product_code,product_name)
tbl_order_detail(order_item_id,order_id,product_id,quantity)
tbl_order(order_id,order_date)