-- Find the Number of Employees

SELECT COUNT(*) AS NumEmployees
FROM Employees;

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

-- Find the Total Number of Units Ordered of Product ID 3

/******************************
SQL Server
******************************/
SELECT SUM(Quantity) AS TotalUnits
FROM OrderDetails
WHERE ProductID=3;

/******************************
Oracle and MySQL
******************************/
SELECT SUM(Quantity) AS TotalUnits
FROM OrderDetails
WHERE ProductID=3;]

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

-- Find the Average Unit Price of Products

SELECT AVG(UnitPrice) AS AveragePrice
FROM Products;

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

-- Find the Earliest and Latest Dates of Hire

SELECT MIN(HireDate) AS FirstHireDate,
    MAX(HireDate) AS LastHireDate
FROM Employees;