Fork of Articles that probably need talk pages by Kaimahi kōhikohiko
This query is marked as a draft This query has been published by '; drop database prod;.

SQL

x
 
SELECT DISTINCT 
  CONCAT("[[", p.page_title, "]]") AS page_title,
  CONCAT("[[Talk:", p.page_title, "]]") AS talk_title,
   r.rev_timestamp AS time
FROM
  revision AS r,
  templatelinks AS tl,
  linktarget AS lt,
  page AS p
  LEFT OUTER JOIN page AS p2 ON 
    p2.page_title = p.page_title
    AND p2.page_namespace = 1
    AND p.page_namespace = 0
WHERE
  tl.tl_from = p.page_id
  AND tl.tl_from_namespace = p.page_namespace
  AND tl.tl_target_id = lt.lt_id
  AND p.page_namespace = 0
  AND p.page_is_redirect = 0
  AND p2.page_title IS NULL
  AND NOT p.page_id IN (
    SELECT
      tl_from
    FROM
      templatelinks,
      linktarget
    WHERE
      templatelinks.tl_target_id = linktarget.lt_id
      AND templatelinks.tl_from_namespace = 0
      AND linktarget.lt_namespace = 10
      AND linktarget.lt_title in (
        'Airport_disambiguation',
        'Animal_common_name',
        'Biology_disambiguation',
        'Call_sign_disambiguation',
        'Chemistry_index',
        'Disambiguation',
        'Geodis',
        'Geo-dis',
        'Geodab',
        'Genus_disambiguation',
        'Given_name',
        'Hndis',
        'Hndab',
        'Hospital_disambiguation',
        'Human_name_disambiguation',
        'Lake_index',
        'Letter-NumberCombDisambig',
        'Letter-Number_Combination_Disambiguation',
        'Letter-Number_combination_disambiguation',
        'Letter-NumberCombinationDisambiguation',
        'Letter-number_combination_disambiguation',
        'Mil-unit-dis',
        'Military_unit_disambiguation',
        'Mathematical_disambiguation',
        'Mountainindex',
        'Mountain_index',
        'Molecular_formula_index',
        'MolFormDisambig',
        'MolFormIndex',
        'Numberdis',
        'Place_name_disambiguation',
        'Plant_common_name',
        'Road_disambiguation',
        'Roadindex',
        'Species_Latin_name_abbreviation_disambiguation',
        'Species_Latin_name_disambiguation',
        'Sport_index',
        'Short_pages_monitor',
        'Surname',
        'Set_index_article',
        'Sia',
        'Schooldis',
        'School_disambiguation',
        'Shipindex',
        'Station_disambiguation',
        'Taxonomy_disambiguation',
        'Wiktionary redirect',
        'Wikidata redirect'
     )
  )
  AND r.rev_id = p.page_latest
  AND r.rev_timestamp < 20190000000000
  -- ORDER BY   r.rev_timestamp
  LIMIT
  200
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...