¿Qué tal algo como esto?
SELECT
(CASE WHEN @date <> date THEN @row := @row +1 ELSE @row END) AS rownum,
@date:= date,
date
FROM ( SELECT @row := 0, @date := NOW() ) r, stats
¿Qué tal algo como esto?
SELECT
(CASE WHEN @date <> date THEN @row := @row +1 ELSE @row END) AS rownum,
@date:= date,
date
FROM ( SELECT @row := 0, @date := NOW() ) r, stats