आप इसे दो एकत्रीकरण के साथ करेंगे:
select type, (case when cnt > XXX then url end) as url, sum(cnt) as visit_cnt
from (select type, url, count(*) as cnt
from t
group by type, url
) t
group by type, (case when cnt > XXX then url end)
order by type, sum(cnt) desc;