Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- DISTINCT products.name AS name
- FROM
- (
- SELECT
- DISTINCT id_product
- FROM
- transactions
- WHERE
- id_store = 3
- ) AS subquery
- RIGHT JOIN products ON products.id_product = subquery.id_product
- WHERE
- subquery.id_product IS NULL
Advertisement
Add Comment
Please, Sign In to add comment