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 concat(REGEXP_SUBSTR(pl_title,'Vuoden_[0-9]{4}_'), 'albumit') AS otsikko, SUM(kuvalliset) AS kuvalliset, SUM(kaikki) AS kaikki, SUM(kuvalliset) / SUM(kaikki) AS osuus FROM ( SELECT pl_title, (CASE WHEN b.cl_from IS NULL THEN 1 ELSE 0 END) AS kuvalliset, 1 AS kaikki FROM page AS pa, page AS pb, pagelinks, categorylinks AS a LEFT JOIN ( SELECT cl_from FROM page, categorylinks WHERE cl_to="Tietolaatikot_joissa_ei_ole_kuvaa" AND cl_from=page_id AND page_namespace=0 ) AS b ON a.cl_from=b.cl_from WHERE pl_from_namespace=4 AND pl_namespace=14 AND pa.page_title="Wikiprojekti_Musiikki/kuvituksen-luokkarajaus" AND pl_from=pa.page_id AND pa.page_namespace=4 AND a.cl_to=pl_title AND pb.page_id=a.cl_from AND pb.page_namespace=0 GROUP BY pb.page_id ) AS tmp GROUP by otsikko;
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...