Please refer to this question -
I am trying to understand the logic of your code – the cross apply definition - can you explain how you ended up with the query result?
There are two tables T1 and T2
1. Select the maximum value for amount for each different combination of (account +item+ month) and sort it descending.
2. Do a Cartesian product of T1 with what we got in Step 1?