How can I optimize? And how can I use count(column) on group by as a column or alias. You see that on this sql have fulltable access and i have fix it and but when I change left