Advertisement
Guest User

BUS 104 Lab 7

a guest
Oct 15th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.78 KB | None | 0 0
  1. SELECT * FROM northwinds.employees WHERE COUNTRY='UK' AND TITLE='Sales Representative';
  2.  
  3. SELECT COUNT(*) FROM northwinds.employees WHERE reportsto=5;
  4.  
  5. SELECT AVG(unitsinstock) FROM northwinds.products WHERE supplierid=1;
  6.  
  7. SELECT * FROM northwinds.products WHERE discontinued=0 AND unitsinstock<;reorderlevel;
  8.  
  9. SELECT SUM(products.unitprice - unitcost) FROM northwinds.products JOIN northwinds.orderdetails ON orderdetails.productid=products.productid WHERE categoryid=3;
  10.  
  11. SELECT SUM(unitsinstock*unitcost) FROM northwinds.products WHERE discontinued=1;
  12.  
  13. SELECT COUNT(*) FROM northwinds.suppliers WHERE contacttitle='Sales Representative';
  14.  
  15. SELECT COUNT(*), SUM(freight) FROM northwinds.orders WHERE shipvia=1 and shipcountry='Germany' OR shipcountry='France' OR shipcountry='Austria';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement