Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select p.*, min(price) m
- from oc_product p
- join
- oc_product_option_value
- using(product_id)
- group by product_id
- order by m
- select o.*, ov.price from oc_product o
- join
- (select product_id, min(price) as price
- from oc_product_option_value ov
- group by product_id)
- ov on o.product_id = ov.product_id
- order by ov.price
Add Comment
Please, Sign In to add comment