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
Zache
.
Toggle Highlighting
SQL
use fiwiki_p; SELECT p.page_title, cl_from, count(distinct(pl_title)) as c from ( select cl_from FROM ( select cl_from from categorylinks where cl_to = "Elävät_henkilöt" OR cl_to LIKE "%kuolleet" OR cl_to LIKE "%syntyneet" OR cl_to LIKE "Syntymävuosi%" OR cl_to LIKE "Kuolinvuosi%" ) as t LEFT JOIN templatelinks ON tl_from=cl_from AND tl_from_namespace=0 AND tl_namespace=10 AND tl_title = "Auktoriteettitunnisteet" WHERE tl_from IS NULL GROUP BY cl_from LIMIT 50000 ) as tt, page as p, page_props as pp, wikidatawiki_p.page as d_p, wikidatawiki_p.pagelinks as d_pl, iwlinks as iwl, wikidatawiki_p.page as d_p2 WHERE p.page_id=tt.cl_from and pp_propname="wikibase_item" and pp_page=cl_from and d_p.page_title=pp_value AND d_p.page_namespace=0 and d_pl.pl_from=d_p.page_id and iwl.iwl_prefix="d" and d_p2.page_title=pl_title and d_p2.page_title=REPLACE(iwl_title, "Property:", "") and d_p2.page_namespace=120 and iwl_from=1256283 GROUP BY cl_from
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...