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
Jura1
.
Toggle Highlighting
SQL
use wikidatawiki_p; SELECT SQL_NO_CACHE wp.pp_value, GROUP_CONCAT(wp.wiki) AS wikis, MIN(wp.cl_timestamp) FROM ((SELECT pp_value, cl_timestamp, "commons" AS Wiki FROM commonswiki_p.categorylinks JOIN commonswiki_p.page_props ON pp_page=cl_from WHERE cl_to="2016_deaths" AND pp_propname="wikibase_item" AND cl_type="subcat" ) UNION ALL (SELECT pp_value, cl_timestamp, "th" AS Wiki FROM thwiki_p.categorylinks JOIN thwiki_p.page_props ON pp_page=cl_from WHERE cl_to="บุคคลที่เสียชีวิตในปี_พ.ศ._2016" AND pp_propname="wikibase_item" AND cl_type="page" ) UNION ALL (SELECT pp_value, cl_timestamp, "enwiki" AS Wiki FROM enwiki_p.categorylinks JOIN enwiki_p.page_props ON pp_page=cl_from WHERE cl_to="2016_deathts" AND pp_propname="wikibase_item" AND cl_type="page" ) ) AS wp WHERE wp.pp_value NOT IN (SELECT page_title FROM wikidatawiki_p.page JOIN wikidatawiki_p.pagelinks ON page_id=pl_from WHERE pl_title = "P570" AND pl_namespace = 120) GROUP BY wp.pp_value ORDER BY wp.cl_timestamp DESC'
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...