Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Steinsplitter
.
Toggle Highlighting
SQL
USE commonswiki_p; SELECT page_namespace, ns_name, page_title, deathyear FROM (SELECT page_namespace, CONVERT(ns_name USING utf8) AS ns_name, CONVERT(page_title USING utf8) AS page_title, CAST(SUBSTRING_INDEX(cl3.cl_to, '_', 1) AS UNSIGNED) AS deathyear FROM categorylinks AS cl1 LEFT JOIN categorylinks AS cl2 ON cl1.cl_from = cl2.cl_from AND cl2.cl_to IN ('Longevity_traditions', 'Longevity_claims') JOIN categorylinks AS cl3 ON cl1.cl_from = cl3.cl_from AND cl3.cl_to REGEXP '^[0-9]+_deaths$' JOIN page ON page_id = cl1.cl_from JOIN toolserver.namespace ON page_namespace = ns_id AND dbname = CONCAT(?, '_p') WHERE cl1.cl_to = CONCAT(?, '_births') AND cl2.cl_from IS NULL) AS BornAndDeads WHERE ? > deathyear OR deathyear - ? > 122;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...