Learn / SQL / Filtering with WHERE
SQL, lesson 2 of 6
Filtering with WHERE
WHERE keeps only the rows that match a condition:
SELECT name FROM languages WHERE paradigm = 'systems';
Text goes in single quotes. Compare numbers with =, <, >, <=, >= and <> (which means "not equal"). Join conditions with AND and OR:
SELECT name FROM languages WHERE year >= 2000 AND paradigm = 'systems';
Your turn
Show the name of every language created in 1995 or later, ordered by name.
Tables you can use
languages (name, year, paradigm, openings): one row per language. openings is the number of job openings, in thousands.
creators (language, creator): who created each language.
Press Run to see your results.
Hint: Use WHERE year >= 1995, then ORDER BY name.
The tutor gives hints, not finished answers. Log in to use it.