Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----- q1
- select * from OrderItems oi
- inner join Product on oi.idProduct = Product.idProduct
- where Product.unit_price between 1000000 and 1010000
- option(maxdop 1)
- ----- q2
- select count(*),sum(oi.quantity)
- from OrderItems oi
- inner join Product on oi.idProduct = Product.idProduct
- where Product.unit_price between 1000000 and 1010000
- option(maxdop 1)
- ----- q3
- select * from OrderItems oi
- inner join Product on oi.idProduct = Product.idProduct
- inner join "Order" on oi.idOrder = "Order".idOrder
- where Product.name like 'Auto%' and year(order_datetime) = 2022 and oi.unit_price between 1000000 and 1010000
- option(maxdop 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement