Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. select od.ProductID
  2. from [Order Details] as od
  3. join Orders as o
  4. on od.OrderID = o.OrderID
  5. join Customers as c
  6. on c.CustomerID = o.CustomerID
  7. group by od.ProductID
  8. having count(c.CustomerID) > 1
  9. order by od.ProductID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement