insert into tb1(url, count_url) 
select distinct url, count_url 
from (select url, count_url, rank() over(group by url order by count_url desc ) rk 
        from tb2 where year='2004' and month='11') t 
where t.rk <= 9;这么写试试