SELECT, FROM, WHERE
Three clauses do most of everyday reading work: project columns, name the table, filter rows.
Watch
Video coming soon
Learn
SELECT customer_id, email
FROM customers
WHERE country = 'UK';
Rules of thumb:
- Prefer explicit column lists over
SELECT *in production extracts. WHEREcompares values; strings need quotes in most dialects.- Combine conditions with
AND/OR; use parentheses when mixing them.
SELECT order_id, amount
FROM orders
WHERE status = 'paid'
AND amount >= 100;
Check
Check understanding
Discussion
Comments
Share feedback or questions about this page. No account required.
Loading comments…