Gevorderde SQL
Jasmin Ludolf
Data Science Content Developer, DataCamp
WHERE filterclausule
WHERE color = 'green'

SELECT title
FROM films
WHERE release_year > 1960;
|title |
|---------------------|
|Judgment at Nuremberg|
|Pocketful of Miracles|
|The Hustler |
|The Misfits |
...
SELECT title
FROM films
WHERE release_year < 1960;
|title |
|-----------------------------------------------|
|Intolerance:Love's Struggle Throughout the Ages|
|Over the Hill to the Poorhouse |
|The Big Parade |
|Metropolis |
...
SELECT title
FROM films
WHERE release_year <= 1960;
|title |
|-----------------------------------------------|
|Intolerance:Love's Struggle Throughout the Ages|
|Over the Hill to the Poorhouse |
|The Big Parade |
|Metropolis |
...
SELECT title
FROM films
WHERE release_year = 1960;
|title |
|-------------|
|Elmer Gantry |
|Psycho |
|The Apartment|
SELECT title
FROM films
WHERE release_year <> 1960;
|title |
|-----------------------------------------------|
|Intolerance:Love's Struggle Throughout the Ages|
|Over the Hill to the Poorhouse |
|The Big Parade |
|Metropolis |
...
> Groter dan of na< Minder dan of vóór= Gelijk aan>= Groter dan of gelijk aan<= Minder dan of gelijk aan<> Niet hetzelfde alsSELECT title
FROM films
WHERE country = 'Japan';
|title |
|-----------------|
|Seven Samurai |
|Tora! Tora! Tora!|
|Akira |
|Madadayo |
|Street Fighter |
...
-- Written code:
SELECT item
FROM coats
WHERE color = 'green'
LIMIT 5;
FROM jassen
WHERE kleur = 'groen'
SELECT item
LIMIT 5;
Gevorderde SQL