I need some help on a query that calculates the total price for an invoice. There is an invoice table and a bills table. The bills have four important fields: a date, a unit cost, a number of units and a taxable value. <BR><BR>It is pretty easy to get a monthly bill for each invoice by using 'sum(units*unitcost) as total'. But some of those units are taxable and some are not. <BR><BR>So what I need help on is how to say something like<BR>'(sum(units*unitcost)*1.0825 WHERE taxable = 1 + sum(units*unitcost)WHERE taxable = 0) AS total' <BR><BR>Any clues?