You can do that in SQL in gsak. Start it from the tools and sqlite manager.
just run the line . The last check between 1 and 10 km was removed because of limits in the max length of querys in the built in sqlite manage. You have to check it manually
If it runs to slow or runs out of memory remove a select * from ( and everything after and including the corresponding ) in the end. And check the removed distance manually.
I am not 100% that it works when don't meat the challenge but with the >10 <20 i get a result.
I am not sure of the borders in the intervals i have use > min and <=max but theta can be changed, just look at the query
There is probibly a quicker and better query but this was the quick and dirty one
select * from (select * from (select * from (select * from (select code,foundbymedate,distance from caches where found=1 and distance >25 and distance <=50) as a join (select code,foundbymedate,distance from caches where found=1 and distance >50 and distance <=100) as b on a.foundbymedate=b.foundbymedate group by a.foundbymedate) as c join (select code,foundbymedate,distance from caches where found=1 and distance >100 and distance <=250) as d on c.foundbymedate=d.foundbymedate group by c.foundbymedate) as e join (select code,foundbymedate,distance from caches where found=1 and distance >250 and distance <=500) as f on e.foundbymedate=f.foundbymedate group by e.foundbymedate) as g join (select code,foundbymedate,distance from caches where found=1 and distance >10 and distance <=25) as h on g.foundbymedate=h.foundbymedate group by g.foundbymedate