• Well done. I compared execution plans and my version seems to have the edge. Especially if you add an index on (requestid, eventdate, eventname). Might be worth testing both on a larger dataset and seeing what happens.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.