TheAnalyst / SQLAll lessons ↗
Day 2 · Core SQL · 10–20 minutes

Comparison and logical operators

Combine conditions with =, <, >, AND, OR and NOT.

01 · Learn

The idea

Combine conditions with =, <, >, AND, OR and NOT. Read the query line by line and identify the input table, the transformation, and the shape of the result before running it.

SELECT name, country FROM customers WHERE country = 'India' AND name LIKE 'A%';
Read it actively

Before running the example, predict the output columns and whether the query returns one row, many rows, or possibly no rows.

02 · Recall

Explain it without looking

In your own words, explain the main SQL feature in today’s lesson and why it answers the question.

03 · Solve

Run your own query

Return names of customers from India whose names begin with A.

Loading browser SQL engine…
04 · Repeat

Close the loop