This query is marked as a draft This query has been published by Zdzislaw.

SQL

x
 
use plwikisource_p;
SELECT DISTINCT src_title, ppr_from_ns, src_len, src_latest, src_id
    FROM
    (SELECT DISTINCT pl_from as ppr_from , pl_namespace as ppr_ns, pl_title as ppr_title, pl_from_namespace as ppr_from_ns, page_id as ppr__page_id, page_title as ppr_page_title
    FROM
    pagelinks INNER JOIN (SELECT DISTINCT page_id, page_title, page_namespace FROM page WHERE page_is_redirect = 1) AS PGT on (page_title = pl_title AND page_namespace = pl_namespace) 
    WHERE
    (pl_from_namespace = 0 OR
    pl_from_namespace = 10 OR
    pl_from_namespace = 100 OR
    /* pl_from_namespace = 102 OR bez autorów */
    pl_from_namespace = 124) AND
    (pl_namespace = 0 OR
    pl_namespace = 100 OR
    pl_namespace = 102) ) AS PRR INNER JOIN (SELECT page_id as src_id, page_title as src_title, page_len as src_len, page_latest as src_latest FROM page) AS SRC on (ppr_from = src_id)
    
LIMIT 7000;
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...