Skip to content

Instantly share code, notes, and snippets.

@nguyenhaison183
Created January 10, 2021 17:14
Show Gist options
  • Save nguyenhaison183/5eefe471649c5689cffcdb79a524c8e1 to your computer and use it in GitHub Desktop.
Save nguyenhaison183/5eefe471649c5689cffcdb79a524c8e1 to your computer and use it in GitHub Desktop.
Project: Davie's Burgers Subway Ad | Codecademy | Analyze data with SQL | 2. Writing basic queries | Extra practice
SELECT *
FROM orders
LIMIT 10;
SELECT DISTINCT order_date
FROM orders;
SELECT special_instructions
FROM orders
LIMIT 20;
SELECT special_instructions
FROM orders
WHERE special_instructions IS NOT NULL
LIMIT 20;
SELECT special_instructions
FROM orders
WHERE special_instructions IS NOT NULL
ORDER BY special_instructions
LIMIT 20;
SELECT special_instructions
FROM orders
WHERE special_instructions LIKE '%sauce%';
SELECT special_instructions
FROM orders
WHERE special_instructions LIKE '%door%';
SELECT special_instructions
FROM orders
WHERE special_instructions LIKE '%box%';
SELECT ID AS '#',
special_instructions AS 'Notes'
FROM orders
WHERE special_instructions LIKE '%box%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment