Utan ROW_NUMBER() kan du fejka det per detta svar eller denna :
SELECT @i := @i + 1 AS i, COUNT(*), ...
FROM affiliates_earnings
JOIN (SELECT @i := 0) dummy
WHERE ...
GROUP BY ...;
Utan ROW_NUMBER() kan du fejka det per detta svar eller denna :
SELECT @i := @i + 1 AS i, COUNT(*), ...
FROM affiliates_earnings
JOIN (SELECT @i := 0) dummy
WHERE ...
GROUP BY ...;