1 Count Distinct Compared on Top 4 SQL Databases
2 It's worth noting, though, that our subselect was written specifically to be faster.
3 MySQL's query planner is bad at subqueries, so these optimizations would have the opposite effect.