Ten Percent Difference Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a formula to put in a query showing the difference between two columns.
I have a current amount column and a previous amount column. I need to show
if the current amount column has had at least a ten percent increase or a ten
percent decrease from the previous amount column.
 
Irishimp23 said:
I need a formula to put in a query showing the difference between two columns.
I have a current amount column and a previous amount column. I need to show
if the current amount column has had at least a ten percent increase or a ten
percent decrease from the previous amount column.

SELECT curr_amount, prev_amount,
((curr_amount - prev_amount) / prev_amount) * 100.0 AS percent_change
FROM amounts
WHERE curr_amount
NOT BETWEEN (prev_amount * 1.1) AND (prev_amount * 9.9)
 
Back
Top