Kiks & Learn
Start learning ↗
SQL / LEARNING JOURNAL

SQL joins: why your row count changed

SELECT chooses columns, FROM chooses a table, and WHERE filters rows. Practice: SELECT name, revenue FROM sales WHERE revenue > 100; Explain which rows remain.

SQL joins: why your row count changed

Select and filter

SELECT chooses columns, FROM chooses a table, and WHERE filters rows. Practice: SELECT name, revenue FROM sales WHERE revenue > 100; Explain which rows remain.

Join related tables

JOIN combines records using a relationship. INNER JOIN keeps matching rows; LEFT JOIN keeps every left row. Practice: join customers to orders on customer_id and inspect customers without orders.

Group and aggregate

GROUP BY forms groups; COUNT counts rows and SUM totals values. WHERE runs before grouping; HAVING filters groups. Practice: total revenue by region and keep totals above 1000.

Your next step

Try the exercises with a small dataset. Write down your assumptions, check the results against the source, and explain one thing you would improve.

Learn together

Sign in to leave a comment →