Write a Query that Selects all fields from "Customers" where country is
"Germany" AND city must be "Berlin" OR "Stuttgart" - correct answer
✔SELECT *
FROM Customers
WHERE Country = 'Germany' AND (City = 'Berlin' OR City = 'Stuttgart');
Write a Query that selects all customers from the "Customers" table, sorted by
the "Country" and the "CustomerName" column. This means that it orders by
Country, but if some rows have the same Country, it orders them by
CustomerName - correct answer ✔SELECT *
FROM Customers
ORDER BY Country, CustomerName;
Insert a new record into the "Customers" table, but only insert data in the
"CustomerName", "City", and "Country" columns - correct answer ✔INSERT
INTO Customers (CustomerName, City, Country)
VALUES ('Rick', 'Lexington', 'USA');
Lists all customers from the Customers table with a NULL value in the
"Address" field - correct answer ✔SELECT *
FROM Customers
WHERE Address IS NULL;
List all customers from the Customers table without a NULL value in the
CustomerName field - correct answer ✔SELECT *
FROM Customers
WHERE CustomerName IS NOT NULL;
, Update the first customer (CustomerID = 1) with a new contact person and a
new city in the Customer Table - correct answer ✔UPDATE Customer
SET ContactPerson = 'John', City = 'Lexington'
WHERE CustomerID = 1;
Deletes the customer "Alfreds Futterkiste" from the "Customers" table - correct
answer ✔DELETE FROM Customers
WHERE CustomerName = 'Alfreds Futterkiste';
Delete all records from the Customers table - correct answer ✔DELETE
FROM Customers;
Write a query statement that finds the price of the cheapest product in the
Products table - correct answer ✔SELECT MIN(Price)
FROM Products;
Write a query that finds the maximum population in the USA from the World
Table - correct answer ✔SELECT MAX(Population)
FROM World
WHERE Country = 'USA';
Write a query to find the total number of Users in the Google table - correct
answer ✔SELECT COUNT(UserID)
FROM Google;
Write a query to find the average amount of cars in the Neighborhood Table -
correct answer ✔SELECT AVG(Cars)