CuriousStudent

SQL dotaz, zkouska 25.5.2023, II

May 25th, 2023
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1.  
  2. select o.idOrder, count(*)
  3. from "order" o
  4. join OrderItems oi on oi.idOrder = o.idOrder
  5. join product p on p.idProduct = oi.idProduct
  6. where year(o.order_datetime) = 2000 and oi.unit_price between 10000 and 12000 and producer LIKE 'O%'
  7. group by o.idOrder
  8. option(maxdop 1)
Advertisement
Add Comment
Please, Sign In to add comment