Untitled
unknown
mysql
2 years ago
936 B
0
Indexable
Never
SELECT ool.id as old_order_list_id, ool.order_id as ool_id, ool.product_id, ool.variant_id, ool.quantity, oo.id as order_id, oo.customer_id, oo.order_no, oo.customer_type, oo.status as status_id, c.id, c.name, c.phone, c.store_address, c.account_type, v.id as variant_id , v.name, p.id, p.unit_id as varient_unit_id, p.name, p.package, p.sku, p2.purchase, p2.manual, p2.new_c, p2.normal, p2.loyal, p2.zone_one, p2.zone_two, p2.zone_three, p2.zone_four, p2.zone_five, p2.zone_six, p2.zone_seven, p2.zone_eight, p2.zone_nine, p2.zone_ten, ocp.order_lists_id, ocp.change_price FROM old_order_lists ool LEFT JOIN old_orders oo ON ool.order_id = oo.id LEFT JOIN customers c on oo.customer_id = c.id LEFT JOIN variants v on ool.variant_id = v.id LEFT JOIN products p on ool.product_id = p.id LEFT JOIN prices p2 on p2.product_id = p.id LEFT JOIN old_change_pricings ocp ON ool.id = ocp.order_lists_id GROUP BY ocp.order_lists_id