SQL
x
set @dab_pageids := (
select GROUP_CONCAT(cl_from)
from categorylinks
where cl_to = "All_disambiguation_pages"
);
select origin_page.page_title as origin_page, rd_title as target_page
from categorylinks
inner join redirect on rd_from = cl_from
inner join page as origin_page on origin_page.page_id = cl_from
inner join page as target_page on target_page.page_namespace = rd_namespace and target_page.page_title = rd_title
where cl_to = "Redirects_connected_to_a_Wikidata_item"
and FIND_IN_SET(target_page.page_id, @dab_pageids)
limit 50;
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.