DISTINCT
SELECT DISTINCT city FROM students; each city once. DISTINCT applies to the whole selected row, not one column in a mix unless that is the only column.
SELECT DISTINCT name, city can still repeat a name if cities differ. If you meant unique names, SELECT DISTINCT name.
Trap: DISTINCT to hide a bad JOIN that multiplied rows. Fix the JOIN. DISTINCT is slower on big tables than a correct query.
On the example next to this theory — DISTINCT — gROUP BY aggregates; HAVING filters groups; ORDER BY sorts the result.
Exam tip
SELECT DISTINCT city FROM students;