Created
September 30, 2020 16:59
-
-
Save jimi008/951d7d8b3b27029a78e3956009b9f703 to your computer and use it in GitHub Desktop.
Davie's Burgers Subway Ad
This file contains 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
SELECT * | |
FROM orders | |
LIMIT 10; | |
-- id, user_id, order_date, restaurant_id, item_name, special_instructions | |
--2 | |
SELECT DISTINCT order_date | |
FROM orders | |
ORDER BY order_date DESC | |
limit 20; | |
-- Recent data is from June 2017 | |
--3 | |
SELECT special_instructions | |
FROM orders | |
where special_instructions is not null | |
order by special_instructions ASC | |
limit 20; | |
--6 | |
SELECT id AS '#', special_instructions AS 'Notes' | |
FROM orders | |
where special_instructions like '%sauce%'; | |
--7 | |
SELECT id AS '#', special_instructions AS 'Notes' | |
FROM orders | |
where special_instructions like '%door%'; | |
--Door Code: Codecademy | |
--8 | |
SELECT id AS '#', special_instructions AS 'Notes' | |
FROM orders | |
where special_instructions like '%box%'; | |
--beat me tic-tac-toe on the pizza box for $5 tip | |
--9 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment