/*
Find the CustomerID of the company that placed order 10290.
*/

SELECT CustomerID
FROM Orders
WHERE OrderID = 10290;

--------------------------

-- Find the name of the company that placed order 10290.

SELECT CompanyName
FROM Customers
WHERE CustomerID = (SELECT CustomerID
            FROM Orders
            WHERE OrderID = 10290);

--------------------------

-- Find the Companies that placed orders in 1997
SELECT CompanyName
FROM Customers
WHERE CustomerID IN (SELECT CustomerID
            FROM Orders
            WHERE OrderDate BETWEEN '1-1-1997' AND '12-31-1997');