-- ToughLog
-- List of Reverse DNS names on the system.

select
	count(revdns), substring(revdns, '([a-z]+)$')
from
	remoteip
where
	revdns is NOT null
GROUP BY
	substring
ORDER BY
	count DESC
LIMIT 40
;

select
	count(revdns), substring(revdns, '([a-z0-9-]+\.[a-z]+)$')
from
	remoteip
where
	revdns is NOT null --AND substring(revdns,'dk$')='dk'
GROUP BY
	substring
ORDER BY
	count DESC
LIMIT 40
;
