Pretty good! Now let's put together all the information we've learnt 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 2003,
- are not Volkswagens,
- their model begins with either 'P' or 'T',
- have their price set.
SQL Query for excersize
SELECT * FROM car WHERE production_year between 1999 and 2003 and brand != 'Volkswagen' and ( model LIKE 'P%' or model LIKE 'T%');
Output
VIN
|
BRAND
|
MODEL
|
PRICE
|
PRODUCTION_YEAR
|
1G1YZ23J9P5800003
|
Fiat
|
Punto
|
5700.00
|
1999
|
No comments:
Post a Comment