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
use itwiki_p; SELECT p_nation.page_title AS nation, p_squads.page_title AS squads, p_squad .page_title AS squad, GROUP_CONCAT( p_guys.page_title ) AS guys 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_guys ON ( cl4.cl_from = p_guys .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 p_nation.page_title NOT LIKE '%_di_%' AND p_squads.page_title NOT LIKE 'Squadre_automobilistiche%' GROUP BY p_squad.page_id # assuming that the squad here is really a squad... but it's not # ( # SELECT * # FROM # categorylinks AS clplayers # JOIN page AS p_players ON ( clplayers.cl_from = p_squad.page_id ) # WHERE # clplayers.cl_to = p_squad.page_title # )
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...