Fork of dewiki giftbot on talk, with known solution by
This query is marked as a draft This query has been published by Luke081515.

SQL

AخA
 
use dewiki_p;
SELECT filter_url, filter_title
FROM 
        (SELECT substring(el_to,28) as filter_url, page_title as filter_title, page_id as filter_page_id
        FROM externallinks as euf INNER JOIN page as pf on euf.el_from=pf.page_id
        WHERE el_index LIKE "http://invalid.dwl.giftbot./%" and pf.page_namespace=1) as diskfilter
INNER JOIN (SELECT substring(euf.el_to,29+15) as found_url, pf.page_title  as found_title
        FROM externallinks as euf INNER JOIN page as pf on euf.el_from=pf.page_id
        WHERE el_index LIKE "https://org.archive.web./web/______________/%" 
        and pf.page_namespace=0
        UNION
        SELECT substring(euf.el_to,20+15) as found_url, pf.page_title  as found_title
        FROM externallinks as euf INNER JOIN page as pf on euf.el_from=pf.page_id
        WHERE el_index LIKE "https://is.archive./______________/%" 
        and pf.page_namespace=0    
           ) as found 
ON ((diskfilter.filter_url = found.found_url) and    (diskfilter.filter_title =found.found_title))     
        
LEFT JOIN 
        (SELECT lnel.el_to, lnp.page_title, lnp.page_id 
         FROM externallinks as lnel INNER JOIN page as lnp on lnel.el_from=lnp.page_id and lnp.page_namespace=0) as leftside
ON (diskfilter.filter_url= leftside.el_to and diskfilter.filter_title= leftside.page_title)
WHERE leftside.page_id is null
LIMIT 26000;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...