Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Exercise 3b
- SELECT * FROM shr WHERE shrprice < 1;
- -- Exercise 3d
- SELECT shrfirm, shrprice, shrqty, shrprice*shrqty AS totalvalue FROM shr;
- -- Exercise 3e
- SELECT shrfirm FROM shr WHERE shrdiv/shrprice*100 > 5;
- -- Exercise 3f
- SELECT shrdiv*shrqty AS totaldividend FROM shr WHERE shrfirm = 'Patagonian Tea';
- -- Exercise 3h
- SELECT shrfirm FROM shr WHERE shrdiv/shrprice*100 = (SELECT MIN(shrdiv/shrprice*100) FROM shr);
- -- Exercise 3l
- SELECT shrfirm, shrdiv/shrprice*100 AS yield FROM shr WHERE shrfirm NOT IN ('Bolivian Sheep', 'Canadian Sugar');
- -- Exercise 3n
- SELECT shrfirm, shrprice*shrqty AS totalvalue FROM shr ORDER BY totalvalue DESC;
- -- Exercise 3p
- SELECT shrcode, shrfirm FROM shr WHERE shrcode LIKE 'B%';
Add Comment
Please, Sign In to add comment