Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Matěj Suchánek
.
Toggle Highlighting
SQL
/*USE cswiki_p; SELECT page_title, COUNT(pl_from) FROM templatelinks JOIN page ON tl_from = page_id JOIN pagelinks ON page_namespace = pl_namespace AND page_title = pl_title WHERE tl_title = 'Pahýl' AND tl_namespace = 10 AND page_namespace = 0 GROUP BY page_title ORDER BY COUNT(pl_from) DESC LIMIT 100; /* SELECT eu_entity_id, eu_aspect, COUNT(*) FROM wbc_entity_usage WHERE eu_aspect <> 'S' GROUP BY eu_entity_id, eu_aspect HAVING COUNT(*) >= 50 ORDER BY COUNT(*) DESC; USE commonswiki_p; SELECT categories.page_title AS category, cat_data.pp_value AS category_item, pages.page_title AS page, page_data.pp_value AS page_item FROM categorylinks JOIN page AS categories ON categories.page_id = cl_from LEFT JOIN page_props AS cat_data ON cat_data.pp_page = categories.page_id AND cat_data.pp_propname = 'wikibase_item' JOIN cswiki_p.page AS pages ON pages.page_namespace = 0 AND pages.page_title = categories.page_title LEFT JOIN cswiki_p.page_props AS page_data ON page_data.pp_page = pages.page_id AND page_data.pp_propname = 'wikibase_item' WHERE cl_to LIKE 'Famous\_trees\_in\_%' AND categories.page_namespace = 14 AND (page_data.pp_value IS NULL OR cat_data.pp_value IS NULL OR page_data.pp_value <> cat_data.pp_value) AND categories.page_is_redirect = 0 AND pages.page_is_redirect = 0; */ USE commonswiki_p; SELECT cl_to, page_title, wbit_item_id, wbxl_language FROM categorylinks JOIN page ON page_id = cl_from LEFT JOIN page_props ON pp_page = page_id AND pp_propname = 'wikibase_item' JOIN wikidatawiki_p.wbt_text ON wbx_text = REPLACE(page_title, '_', ' ') JOIN wikidatawiki_p.wbt_text_in_lang ON wbxl_text_id = wbx_id JOIN wikidatawiki_p.wbt_term_in_lang ON wbtl_text_in_lang_id = wbxl_id JOIN wikidatawiki_p.wbt_item_terms ON wbit_term_in_lang_id = wbtl_id WHERE cl_to LIKE 'Famous\_trees\_in\_%' AND page_namespace = 14 AND page_is_redirect = 0 AND pp_value IS NULL;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...