Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT od.product_id, od.product_attribute_id,od.product_name , SUM(od.product_quantity), SUM(od.total_price_tax_incl)
- FROM pssq_order_detail od
- INNER JOIN pssq_orders o ON (o.id_order = od.id_order)
- WHERE DATE(o.date_add) between '2019-09-01 00:00:00' and '2019-9-30 23:59:59'
- AND o.current_state = 5
- AND od.product_id IN (34,39,63,64,65,68)
- GROUP BY od.product_id,od.product_attribute_id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement