Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. SELECT
  2. DISTINCT products.name AS name
  3. FROM products
  4. LEFT JOIN
  5. (
  6. SELECT
  7. id_product,
  8. id_store
  9. FROM
  10. transactions
  11. WHERE
  12. CAST(transactions.date as date) = '2019-06-11'
  13. ) AS subquery ON subquery.id_product = products.id_product
  14. WHERE
  15. subquery.id_store IS NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement