Write a SQL to meet my requirement.
Posted
by
rgksugan
on Stack Overflow
See other posts from Stack Overflow
or by rgksugan
Published on 2010-12-28T14:42:44Z
Indexed on
2010/12/28
14:54 UTC
Read the original article
Hit count: 232
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)
© Stack Overflow or respective owner