Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. Select EmployeeID,
  2. (Select count(OrderID)
  3. from Orders where EmployeeID = E.EmployeeID)
  4. from Employees E
  5.  
  6. Select C.CategoryID, C.CategoryName, AVG(P.UnitPrice)
  7. From Products P, Categories C Where P.CategoryID = C.CategoryID
  8. Group by C.CategoryID, C.CategoryName
  9.  
  10. Select * from Customers
  11. Select * from Orders
  12.  
  13. Select C.CustomerID, C.ContactName, Count(O.OrderID)
  14. From Customers C, Orders O Where C.CustomerID=O.CustomerID and year(ShippedDate)='1997'
  15. Group by C.CustomerID, C.ContactName
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement