Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM northwinds.employees WHERE COUNTRY='UK' AND TITLE='Sales Representative';
- SELECT COUNT(*) FROM northwinds.employees WHERE reportsto=5;
- SELECT AVG(unitsinstock) FROM northwinds.products WHERE supplierid=1;
- SELECT * FROM northwinds.products WHERE discontinued=0 AND unitsinstock<reorderlevel;
- SELECT SUM(products.unitprice - unitcost) FROM northwinds.products JOIN northwinds.orderdetails ON orderdetails.productid=products.productid WHERE categoryid=3;
- SELECT SUM(unitsinstock*unitcost) FROM northwinds.products WHERE discontinued=1;
- SELECT COUNT(*) FROM northwinds.suppliers WHERE contacttitle='Sales Representative';
- 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