Tak jsem vytvoreil nasledujici SQL:
select au.author,au.cnt, ct.cachetype, ct.cnt
FROM (SELECT author,count(key) cnt FROM geocache GROUP BY author ORDER BY count(key) DESC) au,
(select author, cachetype,count(key) cnt from geocache group by author,cachetype order by author, cnt desc) ct
where au.author=ct.author
and ct.cnt=(select count(key) from geocache where author=au.author group by author,cachetype order by author, count(key) desc limit 1)
and ct.cachetype=(select cachetype from geocache where author=au.author group by author,cachetype order by author, count(key) desc limit 1)
order by au.cnt desc,au.author
Ze bych na to byl pysny, tak to tedy ne: sice to funguje, ale je to priserne, kostrbate, trva to dlouho, ... Ale nejsem zadny odbornik na databaze a treba se tu najde nekdo, kdo to vylepsi.