OK, some examples
To get all the quantities for each item from an account
SELECT ItemNumber, SUM(Quantity) AS Quantity FROM table
WHERE AccountNumber = $acc
GROUP BY ItemNumber
To do the same for a range of account numbers
SELECT AccountNumber, ItemNumber, SUM(Quantity) AS Quantity FROM table
WHERE AccountNumber BETWEEN $x AND $y
GROUP BY AccountNumber, ItemNumber
Likewise for a date range