I find separating the join criteria from the filter criteria makes working with multiple table queries easier. Also, I would rewrite your current query using a CTE to replace the derived table. Would make the query even easier to read. You should give it a try.