Ver originalSELECT COUNT(e.`IdTransactions`) `numOfTransactions` FROM compras e WHERE e.`IdClient` = '540' AND e.`date` BETWEEN '2012-08-23' AND '2012-09-07'HAVING SUM(e.`amount` + e.`tax`) >= 2000.00