Alaricy

Расш. возм. SQL. Урок 7. Подзапросы. задача 2/4

Jan 13th, 2022 (edited)
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.28 KB | None | 0 0
  1. SELECT DISTINCT
  2.     user_id
  3. FROM
  4.     transactions
  5. WHERE
  6. id_product IN
  7.     (SELECT
  8.     id_product
  9.     FROM
  10.     products_data_all
  11.     WHERE
  12.     (category='молоко и сливки' AND  price > 120) OR
  13.     (category='масло сливочное и маргарин' AND price > 354));
Add Comment
Please, Sign In to add comment