Percentage of potentially validating resolvers in a specific country

Description:


Get the percentage of potentially validating resolvers in a specific country. Note however, that the fact that a resolver asks for DS or DNSKEY records does not necessarily mean that it is actually validating.



Impala Query:


select dnssec.number / total.number * 100 as percentage
from
(
select count(distinct src) as number
from dns.queries
where country='CH') total
join
(
select count(distinct src) as number
from dns.queries
where edns_do=true
and (qtype = 43 or qtype = 48)
and country='CH' ) dnssec on 1=1;




Example Output:


percentage
11.41771161334799