Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
See the whole table
Select some columns
Filtering rows
Logic
Text patterns
To be or NULL to be
A little bit of mathematics
Let's practice
22. Put your skills into practice

Instruction

Very good! Now let's put together all the information we've learned so far. Let's imagine a customer who walks in and wants to know if we have any cars that meet his needs.

Exercise

Select all columns of those cars that:

  • were produced between 1999 and 2005,
  • are not Volkswagens,
  • have a model that begins with either 'P' or 'F',
  • have their price set.

Stuck? Here's a hint!

Type:

SELECT *
FROM car
WHERE production_year BETWEEN 1999 AND 2005
  AND brand != 'Volkswagen'
  AND (model LIKE 'P%' OR model LIKE 'F%')
  AND price IS NOT NULL;