can someone rewrite this query for mysql? SELECT * FROM cust_bill WHERE 0 != charged - ( select coalesce(sum(amount),0) from cust_bill_pay where cust_bill_pay.invnum = cust_bill.invnum ) - ( select coalesce(sum(amount),0) from cust_credit_bill where cust_credit_bill.invnum = cust_bill.invnum ) -- _ivan