Hi,
I got some great help on the forum to create my total due query. However it produces it with just total due, how could i have it by month?
each table has a DueDate column which i would like to show on the query along with the users FullName from the users table which would join via clients table.
The existing query is this:
select sum(sub_amt) total_due from ( SELECT sum(AmountGI) sub_amt
FROM generalinsurance
WHERE DatePaidGI is null union select sum(amount) sub_amt from protection where DatePaid is null union select sum(amount) sub_amt from buytolet where DatePaid is null union select sum(amount) sub_amt from mortgage where DatePaid is null union select sum(Commission) sub_amt from referrals where DatePaidReferral is null union select sum(Commission) sub_amt from overseas where DatePaidOverseas is null ) a
if anyone could help with this i would appreciate this.
Thanks