Hi Baron,
Thanks for your message.
After endless nights trying I could not get it to work, so I finally
created a temporary table and run a second query to get the percentages.
It works fine for now, but I wonder if it will take too long once
there are thousands of records. Is there an alt
I would create the query as you've shown for the current year, and
then the same for the previous year, and join the two, like this:
select
from ( ) as this_year
inner join ( ) as last_year using (year, month);
This is probably something a little like what you are trying to do,
logically; b