I have this MySQL query:
SELECT DAYOFYEAR(`date`) AS d, COUNT(*) FROM `orders` WHERE `hasPaid` > 0 GROUP BY d ORDER BY d
Which re
This is one of the only places where cursors are faster than a set based queries, if performance is critical I would either