Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM tmp.shops
- INNER JOIN
- (SELECT * FROM tmp.products
- WHERE tmp.products.shop_id IN
- (SELECT id FROM shops where user_id = 1)) as nested_query
- ON tmp.shops.id = nested_query.shop_id;
Add Comment
Please, Sign In to add comment