This query is marked as a draft This query has been published by XXN.

SQL

AخA
 
USE wikidatawiki_p;#Q11266439 - template || Q4167410 - disambig || Q4167836 - category
SELECT #CONCAT("# [[Q",epp1.epp_entity_id,"]]") AS item, w1.term_text as label
CONCAT("Q",epp1.epp_entity_id) AS item, w1.term_text as label
    FROM (SELECT * FROM pagelinks WHERE pl_title = "Q4167836" AND pl_from_namespace = 0) AS total
    JOIN wb_entity_per_page AS epp1 ON epp_page_id = total.pl_from
    JOIN page on epp_page_id = page_id
join wb_terms w1 on epp1.epp_entity_id = w1.term_entity_id
WHERE w1.term_entity_type = 'item' 
        AND w1.term_language = 'en' 
        AND w1.term_type = 'label' AND w1.term_text not like "Category:%"#"Template:%"
GROUP BY total.pl_from
order by w1.term_text DESC
limit 1000
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.

Checking query status...