The problem statement suggests you use the following steps:
- Construct a query, with a single result row giving the values for June.
- Construct a query, with a single result row giving the values for May.
- Compare the results of the two queries.
The issue is that, in SQL, it's not super easy to do that third step. One way to do it is by doing a cross join, which yields a row containing all the values from both subqueries; it's then easy to use SELECT (b - a) ...
to get the differences you're looking for. This isn't the only way to do the third step, but what you have definitely doesn't work.