Fork of Voci senza interlink e con un solo link in ingresso (ricerca per dimensione) by Mess
This query is marked as a draft This query has been published by Mess.

SQL

AخA
 
SELECT CONCAT("# [[", page_title, "]], (", DATE_FORMAT(rev_timestamp, '%e %b %Y, %H:%i'), ")")
FROM page, revision
WHERE page_namespace = 0
AND page_is_redirect = 0
AND rev_page = page_id
AND rev_parent_id = 0
AND page_title IN (
SELECT DISTINCT lt_title FROM linktarget
WHERE lt_namespace = 0
AND lt_title = page_title
AND lt_id IN (
  SELECT DISTINCT pl_target_id
    FROM pagelinks
    WHERE pl_from_namespace = 0
  AND pl_from NOT IN
  (SELECT DISTINCT page_id
   FROM page
   WHERE page_is_redirect = 1)
  AND pl_from NOT IN
  (SELECT DISTINCT cl_from
   FROM categorylinks, linktarget
   WHERE cl_to = lt_title
   AND lt_namespace = 14
   AND lt_id IN
   (SELECT DISTINCT pl_target_id
    FROM pagelinks
    WHERE pl_from = 4195411
   )
  )
  GROUP BY pl_target_id HAVING COUNT(*)=1
)
)
AND page_id NOT IN
     (SELECT DISTINCT cl_from
   FROM categorylinks, linktarget
   WHERE cl_to = lt_title
   AND lt_namespace = 14
   AND lt_id IN
   (SELECT pl_target_id
    FROM pagelinks
    WHERE pl_from = 4195411
   )
   )
AND page_id IN
(SELECT DISTINCT tl_from
FROM templatelinks
WHERE tl_target_id IN
(SELECT DISTINCT lt_id
 FROM linktarget
 WHERE lt_namespace = 10
 AND lt_title IN ('Bio')))
AND page_id NOT IN
(SELECT ll_from
FROM langlinks)
ORDER BY page_len;
/*ORDER BY rev_timestamp;*/
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...