How do I generate a report in RMS for discounts given to customers?

I need to know how to generate a report in RMS that will show discounts given to customer over a quarterly and annually basis. How do I generate a report in RMS for discounts given to customers?

After searching online I was able to find a query that I altered a bit due to an error.

select sum((fullprice - price)quantity) from [transactionentry] where quantity >0 and TransactionNumber > '********’

Where it shows ********* I put in the first transaction of the first day and it calculated the full price minus the price sold.

select sum((fullprice - price)quantity) from [transactionentry] where quantity >0 and transactionnumber >= ‘********’ and transactionnumber <= '******’

Listed above gives me the exact dating. The earlier one gives me up to today. Remember ***** are the actual transaction numbers.