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
.
Toggle Highlighting
SQL
use itwiki_p; SELECT tl_namespace, CONCAT( 'https://it.wikipedia.org/wiki/', page_title ) as url FROM page JOIN templatelinks ON ( page_id = tl_from ) JOIN categorylinks AS cl ON ( page_id = cl.cl_from ) WHERE -- template tl_namespace = 10 AND tl_title = 'StemmiComunaliItaliani' -- categories AND cl.cl_type = 'file' AND cl.cl_to IN ( 'Immagini_GFDL', 'Immagini_GFDL_con_disclaimer', 'Immagini_GFDL-Utente' ) -- exclude categories AND NOT EXISTS ( SELECT * FROM categorylinks AS sub_cl WHERE page_id = sub_cl.cl_from AND sub_cl.cl_to IN ( 'Immagini_in_CC_BY-SA' ) )
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...