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

SQL

AخA
 
SELECT
  pl_from,
  -- pl_from_namespace does not appear to be consistently reliable;
  -- it might be better to select from the page table and join the pagelinks table to it.
  CASE
    WHEN pl_from_namespace != page_namespace THEN CONCAT(pl_from_namespace, ' vs. ', page_namespace)
    ELSE pl_from_namespace
  END AS 'NS',
  page_title,
  pl_namespace AS 'L NS',
  GROUP_CONCAT(pl_title SEPARATOR ' ') AS 'L titles',
  COUNT(pl_title) AS num_L
FROM pagelinks
LEFT JOIN page ON page_id = pl_from
WHERE
  pl_namespace = 0
  AND pl_from_namespace = 0
  AND pl_title RLIKE '[0-9]{4}\_in\_video\_games'
  -- AND pl_title RLIKE '[0-9]{4}_in_video_games'
-- GROUP BY pl_from
-- ORDER BY page_title
-- LIMIT 10
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...