Guest User

Untitled

a guest
Jul 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. SELECT * FROM tmp.shops
  2. INNER JOIN
  3. (SELECT * FROM tmp.products
  4. WHERE tmp.products.shop_id IN
  5. (SELECT id FROM shops where user_id = 1)) as nested_query
  6. ON tmp.shops.id = nested_query.shop_id;
Add Comment
Please, Sign In to add comment