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
Valerio Bozzolan
.
Exaustive description here https://it.wikipedia.org/wiki/Wikipedia:Elenchi_generati_offline/Richieste#Categorie_di_squadre_con_pi%C3%B9_allenatori_o_giocatori
Toggle Highlighting
SQL
# I spent very much time in indenting this query in the hope to understand tomorrow of what I've written here. # Obviously tomorrow I will not understand anything here. asd # Post edited: it's tomorrow and I don't understand anything. asd USE itwiki_p; ( SELECT 'asd_1' AS layer, p_nation.page_title AS nation, p_squads.page_title AS squads, p_squad .page_title AS squad , COUNT( p_ssquad.page_id ) AS n_squad_subcats, GROUP_CONCAT( p_ssquad.page_title ) AS squad_subcats FROM categorylinks AS cl1 JOIN page AS p_nation ON ( cl1.cl_from = p_nation.page_id ) JOIN categorylinks AS cl2 ON ( cl2.cl_to = p_nation.page_title ) JOIN page AS p_squads ON ( cl2.cl_from = p_squads.page_id ) JOIN categorylinks AS cl3 ON ( cl3.cl_to = p_squads.page_title ) JOIN page AS p_squad ON ( cl3.cl_from = p_squad .page_id ) JOIN categorylinks AS cl4 ON ( cl4.cl_to = p_squad .page_title ) JOIN page as p_ssquad ON ( cl4.cl_from = p_ssquad.page_id ) WHERE FALSE AND cl1.cl_to = 'Squadre_sportive_per_nazione' AND cl2.cl_type = 'subcat' AND cl3.cl_type = 'subcat' AND cl4.cl_type = 'subcat' AND p_nation.page_title NOT LIKE '%_di_%' AND p_squads.page_title NOT LIKE 'Squadre_automobilistiche%' AND p_ssquad.page_title NOT LIKE '%Allenatori%' AND p_ssquad.page_title NOT LIKE '%Dirigenti%' AND p_ssquad.page_title NOT LIKE '%Immagini%' AND p_ssquad.page_title NOT LIKE '%Incontri%' AND p_ssquad.page_title NOT LIKE '%Presidenti%' AND p_ssquad.page_title NOT LIKE '%Storia%' AND p_ssquad.page_title NOT LIKE '%Stagioni%' GROUP BY p_squad.page_id HAVING n_squad_subcats BETWEEN 2 AND 11 ) UNION ( SELECT 'asd_2' AS layer, p_nation .page_title AS nation, p_ssquads.page_title AS squads, p_ssquad .page_title AS squad , COUNT( p_sssquad.page_id ) AS n_squad_subcats, GROUP_CONCAT( p_sssquad.page_title ) AS squad_subcats FROM categorylinks AS cl1 JOIN page AS p_nation ON ( cl1.cl_from = p_nation .page_id ) JOIN categorylinks AS cl2 ON ( cl2.cl_to = p_nation .page_title ) JOIN page AS p_squads ON ( cl2.cl_from = p_squads .page_id ) JOIN categorylinks AS cl3 ON ( cl3.cl_to = p_squads .page_title ) JOIN page AS p_squad ON ( cl3.cl_from = p_squad .page_id ) JOIN categorylinks AS cl4 ON ( cl4.cl_to = p_squad .page_title ) JOIN page as p_ssquad ON ( cl4.cl_from = p_ssquad .page_id ) JOIN categorylinks AS cl5 ON ( cl5.cl_to = p_ssquad .page_title ) JOIN page as p_sssquad ON ( cl5.cl_from = p_sssquad.page_id ) WHERE cl1.cl_to = 'Squadre_sportive_per_nazione' AND cl2.cl_type = 'subcat' AND cl3.cl_type = 'subcat' AND cl4.cl_type = 'subcat' AND cl5.cl_type = 'subcat' AND p_nation.page_title NOT LIKE '%_di_%' AND p_squads.page_title NOT LIKE 'Squadre_automobilistiche%' AND p_ssquad.page_title NOT LIKE '%Allenatori%' AND p_ssquad.page_title NOT LIKE '%Dirigenti%' AND p_ssquad.page_title NOT LIKE '%Immagini%' AND p_ssquad.page_title NOT LIKE '%Incontri%' AND p_ssquad.page_title NOT LIKE '%Presidenti%' AND p_ssquad.page_title NOT LIKE '%Storia%' AND p_ssquad.page_title NOT LIKE '%Stagioni%' GROUP BY p_squad.page_id HAVING n_squad_subcats BETWEEN 2 AND 11 ) ORDER BY squad ASC
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...