Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select CustomerName, OrderID, Productname, Quantity from Customers, (
- select CustomerID as pID, oID as OrderID, ProductName, Quantity from [Orders], (
- select OrderID as oID, productName, Quantity from OrderDetails , (
- select ProductID as tingen, ProductName from Products where productID == 33 or productID == 71
- )where ProductID == tingen and Quantity >= 5 group by OrderID
- )where oID == OrderID Group by CustomerID) where CustomerID == pID group by CustomerID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement