MariaDB [stat_track]> SET @k:=0; SELECT @k:=@k+1, ip, COUNT(ip), COUNT(ip)/17017 FROM ip_datetime GROUP BY ip ORDER BY COUNT(ip);