You have 2 group by that take more than 5 sec each. Do you know what those are for?