Practice · Agriculture · Easy

Which crops do we track?

Return each distinct crop name, alphabetically.

Runs in your browser. No signup needed.

What you are given

crops(crop, year, million_tonnes). Use SELECT DISTINCT and ORDER BY.

Starting point

SELECT DISTINCT crop
FROM crops
ORDER BY crop;

The reference solution is checked automatically when you run your query on the practice page — results are compared row by row, and order matters for this one.

Did you know

DISTINCT collapses duplicates — essential when a table stores many rows per thing (here, several years per crop). (SQLite docs)

More Agriculture challenges

Open it in the playground →