SQL
AخA
use dewiki_p;
SET sql_mode='PIPES_AS_CONCAT';
select '- [['||REPLACE(lt_title, '_', ' ')||']] <!-- '|| c ||' Links -->' as output
from (select lt_title , count(*) as c , lt_namespace
from linktarget
inner JOIN pagelinks ON lt_id = pl_target_id
where pl_from_namespace=0 and lt_namespace=0
group by lt_title, lt_namespace
having count(*)>97) as pl
left join page
on (pl_title=page_title and page_namespace= lt_namespace)
where page_id is null
order by c desc
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.