Problem Sets + Solutions for computer science topics
SELECT category_name, description
FROM categories
ORDER BY category_name;
SELECT contact_name, address, city
FROM customers
WHERE country NOT IN ('Germany', 'Mexico', 'Spain');
SELECT order_date, shipped_date, customer_id, freight
FROM orders
WHERE order_date = '2018-02-26';
SELECT employee_id, order_id, customer_id, required_date, shipped_date
FROM orders
WHERE shipped_date > required_date;
SELECT order_id
FROM orders
WHERE order_id % 2 = 0;
SELECT city, company_name, contact_name
FROM customers
WHERE city LIKE '%L%'
ORDER BY contact_name;
SELECT company_name, contact_name, fax
FROM customers
WHERE fax IS NOT NULL;
SELECT first_name, last_name, hire_date
FROM employees
WHERE hire_date = (SELECT MAX(hire_date) FROM employees);
SELECT ROUND(AVG(unit_price), 2), SUM(units_in_stock), SUM(discontinued)
FROM products;