Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT fsmall.category, fsmall.title, fsmall.description, fsmall.id AS Small_Id, fsmall.VALUE AS Small_Value, flarge.id AS Large_Id, flarge.VALUE AS Large_Value
- FROM my_table fsmall JOIN
- my_table flarge
- ON fsmall.subcategory = 'small' AND flarge.subcategory = 'large' AND
- fsmall.category = flarge.category AND
- fsmall.title = flarge.title AND
- fsmall.description = flarge.description
- WHERE fsmall.category = "Fruit"
Advertisement
Add Comment
Please, Sign In to add comment