Calculate the average amount of payments made by customers during the first half of 2004.
average amount of payments = DIVIDE(SUM(amount), COUNT(customerNumber); first half of 2014 refers to paymentDate > = '2004-01-01' AND paymentDate < '2004-07-01;
SELECT AVG(amount) FROM payments WHERE paymentDate BETWEEN '2004-01-01' AND '2004-06-30'