been trawling the web trying to find anything on this but cant find anything to hand.
SELECT monthlycommission.DatePaid, monthlycommission.MonthPaid, monthlycommission.YearPaid -1 year FROM monthlycommission where YearPaid = now() group by MonthPaid order by DatePaid ASC
basically this query works however it is not what i want it to be.
i want it to where the YearPaid is the current year minus 1
so i will have thid query along with anotehr query which is where YearPaid is now().
so it will be comparing this years commision vs last years amount paid.
the YearPaid - 1 year only subtracts it to 2010 in the output, but the data is still from this year so i need a where clause that is a minus 1 year.
any help greatly appreciated.