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

SQL

x
 
USE dewiki_p;
SELECT STRAIGHT_JOIN fromPage.page_title, pl_title, SUBSTRING_INDEX(pl_title, "(", -1) AS "Partei"
  FROM pagelinks LEFT JOIN page AS toPage
                        ON toPage.page_namespace = pl_namespace
                       AND toPage.page_title = pl_title,
       page as fromPage
 WHERE pl_from_namespace = 0
   AND pl_namespace = 0
   AND toPage.page_id IS NULL
   AND (pl_title like "%(SPD%"
        OR pl_title like "%(CDU%"
        OR pl_title like "%(CSU%"
        OR pl_title like "%(FDP%"
        OR pl_title like "%(Grün%"
        OR pl_title like "%(KPD%"
        OR pl_title like "%(NPD%"
        OR pl_title like "%(Link%"
        OR pl_title like "%(REP%"
        OR pl_title like "%(Republikaner%")
   AND fromPage.page_id = pl_from
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...