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
MisterSynergy
.
Toggle Highlighting
SQL
USE dewiki_p; -- first approach: filter away all pages that have echa.europa.eu links from templates -- SELECT -- page_id, -- the page id on which the link appears -- page_title, -- page title, always main namespace -- el_to -- the link to http(s)://echa.europa.eu/… -- FROM externallinks JOIN page ON el_from=page_id -- externallinks doc is at https://www.mediawiki.org/wiki/Manual:Externallinks_table -- WHERE -- (el_index LIKE 'http://eu.europa.echa%' OR el_index LIKE 'https://eu.europa.echa%') -- AND page_namespace=0 -- main namespace only -- list of page_id in brackets from https://petscan.wmflabs.org/?psid=1798228 (pages that use a template which generates a echa.europa.eu link) -- second approach: list echa.europa.eu links from {{Cirrus|insource:/echa\.europa\.eu/}} SELECT page_id, -- the page id on which the link appears page_title, -- page title, always main namespace el_to -- the link to http(s)://echa.europa.eu/… FROM externallinks JOIN page ON el_from=page_id -- externallinks doc is at https://www.mediawiki.org/wiki/Manual:Externallinks_table WHERE (el_index LIKE 'http://eu.europa.echa%' OR el_index LIKE 'https://eu.europa.echa%') AND page_namespace=0 -- main namespace only -- list of page_id in brackets from https://de.wikipedia.org/w/api.php?action=query&list=search&srlimit=500&srsearch=insource%3A%2Fecha\.europa\.eu%2F AND el_from IN (813252,1866427,9245292,41798,17509,270205,68256,32719,405232,102529,55741,52930,157567,158955,1661225,167723,681733,4488842,702435,577476,20041,686307,544549,150332,721940,139013,1661578,1089860,252078,369895,8901620,1470039,141597,263612,406711,934653,782400,2901439,4688850,1337379,1477252,1515333,627861,2913599,3238201,1028223,1839159,1657048,4392409,17760,276279,2193966,475942,1581963,8182337,2933879,591448,4766994,2286125,2939674,4287812,3899004,8192320,1051439,319783,5682805,5690465,698845,2720465,276276,8331553,276284,3188832,5659241,8965917,2642324,5610504,7245224,8571650,7853562,8148993,7182396,1263591,8470293,1300586,7825819,8949307,9517986,8203126,7075007,9529044,7895751,8313706,8802421,9937178,8811214,8476171,9736024,1927141,8805723,8477071,8360565,10062903,8997720,6510253,9943311,9716778,9962720,9648406,9708376,9942827,9936803,8531259,9062951,9476418,9832531,8958231,9842000,9644371,9698537);
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...