Created
May 8, 2016 04:33
-
-
Save benadaba/ec1adb611789a7afdb0a193526bf2db5 to your computer and use it in GitHub Desktop.
Ex 5 Teradata Dillard.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*(a) rows in the trsnact table that have “0” in their orgprice column (how could the | |
--original price be 0?), */ | |
SELECT * | |
FROM TRNSACT | |
WHERE ORGPRICE = 0; | |
-- (b) rows in the skstinfo table where both the cost and retail price are listed as 0.00, | |
SELECT * | |
FROM SKSTINFO | |
WHERE COST =0.00 AND RETAIL = 0.00; | |
/* (c) rows in the skstinfo table where the cost is greater than the retail price (although | |
occasionally retailers will sell an item at a loss for strategic reasons, it is very | |
unlikely that a manufacturer would provide a suggested retail price that is lower | |
than the cost of the item).*/ | |
SELECT * | |
FROM SKSTINFO | |
WHERE COST > RETAIL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment