SELECT, WHERE, ORDER BY EXERCISES
SELECT * FROM Customers ORDER BY Country, City;
Exercise: Select all records from the Customers table, sort the result alphabetically, first by the column Country, then, by the column City.
SELECT
Insert the missing statement to get all the columns from the Customers table.
SELECT * FROM Customers ORDER BY City;
Select all records from the Customers table, sort the result alphabetically by the column City.
SELECT * FROM Customers ORDER BY City DESC;
Select all records from the Customers table, sort the result reversed alphabetically by the column City.
WHERE CITY = 'Berlin'
Select all records where the City column has the value "Berlin".
SELECT WHERE AND PostalCode
Select all records where the City column has the value 'Berlin' and the PostalCode column has the value 12209.
SELECT * FROM Customers WHERE City = 'Berlin' OR City = 'London';
Select all records where the City column has the value 'Berlin' or 'London'.
WHERE CustomerID = 32
Select all records where the CustomerID column has the value 32.
SELECT DISTINCT
Select all the different values from the Country column in the Customers table.
WHERE NOT City = 'Berlin'
Use the NOT keyword to select all records where City is NOT "Berlin".
SELECT CITY FROM
Write a statement that will select the City column from the Customers table.