Looking for the most efficient mysql query for month comparison -
I am pulling from tables with minimum 200k records and performing multiple queries for building site useage reports.
Do you know a more efficient way to write this query?
One possible caveat with the approach you've taken - won't that, for example, pick all last_visits from November regardless of the year the visit is made in?