Uden ROW_NUMBER(), kan du forfalske det i dette svar eller denne :
SELECT @i := @i + 1 AS i, COUNT(*), ...
FROM affiliates_earnings
JOIN (SELECT @i := 0) dummy
WHERE ...
GROUP BY ...;
Uden ROW_NUMBER(), kan du forfalske det i dette svar eller denne :
SELECT @i := @i + 1 AS i, COUNT(*), ...
FROM affiliates_earnings
JOIN (SELECT @i := 0) dummy
WHERE ...
GROUP BY ...;