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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top