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
EqJjgOa8rVvsRmZL
.
Toggle Highlighting
SQL
with recursive subcats (cur_path, cur_dest) as ( select distinct cl_to, cl_to from categorylinks where cl_to in ("Lists_of_events") union all select concat(cur_path, ',', page_title), page_title from subcats, categorylinks, page where cl_type = 'subcat' and cl_from = page_id and cl_to = cur_dest and not find_in_set(page_title, cur_path) ) select count(cur_path) from subcats; /* select count(distinct page.page_title) from subcats join categorylinks on cl_to = subcats.page_title and cl_type = 'page' join page on cl_from = page_id; */ /* select group_concat(page_title separator '", "') from categorylinks, page where cl_type = 'subcat' and cl_from = page_id and cl_to = 'History-related_lists' "History-related_lists_by_country", "Lists_of_history_lists", "Prehistory-related_lists", "Ancient_history-related_lists", "Middle_Ages-related_lists", "Historical_timelines", "Lists_by_time", "Archaeology-related_lists", "Lists_of_archives", "Cultural_history-related_lists", "Lists_of_disasters", "Lists_of_events", "Lists_of_expeditions", "Lists_of_historical_films", "Lists_of_former_entities", "Lists_of_historians", "Lists_of_massacres", "Lists_by_military_conflict", "Lists_of_monuments_and_memorials", "Lists_of_historic_places", "Social_history-related_lists", "History-related_lists_of_superlatives" */
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...