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
Bdijkstra
.
https://nl.wikipedia.org/wiki/Categorie:Wikipedia:Moviemeter_zonder_ID_op_Wikidata `cmd` is bash-command line for wikibase-cli
Toggle Highlighting
SQL
SELECT page_title, CONCAT('claim_guid=$(wd add-claim ', pp_value, ' P', CASE LEFT(cl_sortkey_prefix, 1) WHEN 'F' THEN '1970' WHEN 'P' THEN '9463' WHEN 'R' THEN '1969' ELSE '?' END, " '", RIGHT(cl_sortkey_prefix, LENGTH(cl_sortkey_prefix) - 1), "' | jq -r .claim.id); wd add-reference $claim_guid P143 Q10000") AS 'cmd' FROM categorylinks, page, page_props WHERE page_id NOT IN ( 72643, /* Kill Bill */ 231647, /* Joel en Ethan Coen */ 606198, /* Poltergeist (filmserie) */ 5333835 /* Gebroeders Safdie */ ) AND cl_to='Wikipedia:Moviemeter_zonder_ID_op_Wikidata' AND cl_from=page_id AND page_namespace=0 AND pp_page=page_id AND pp_propname='wikibase_item' ORDER BY cl_sortkey_prefix
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...