help getting query work

hi there,
can i ask some help please.

i need to get the addon percentage on my database... add on is being computed based on the difference between an invoice and estimate.

my query goes like this:

SELECT
COUNT(estimate) as est,
SUM(invoice-estimate) as addons,
SUM(addons / est) * 100 as Percentage
FROM tblestimates

What is the best way to do this? i know that i cant use aliases on the computation i made.
Thank you

from Databases http://ift.tt/29N9dVe
via IFTTT
Previous
Next Post »
Thanks for your comment