Skip to main content

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.
  • WHERE compares 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

Which clause filters rows?
Which practices help production extracts?

Select all that apply

Discussion

Comments

Share feedback or questions about this page. No account required.

Loading comments…