Last active
February 16, 2022 23:30
-
-
Save namedgraph/82c705dbaf40d9edbffea55139a928eb to your computer and use it in GitHub Desktop.
Best sci-fi movies on Wikidata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
PREFIX bd: <http://www.bigdata.com/rdf#> | |
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |
PREFIX wikibase: <http://wikiba.se/ontology#> | |
SELECT ?filmLabel ?score | |
WHERE | |
{ ?film wdt:P136 <http://www.wikidata.org/entity/Q471839> ; | |
wdt:P444 ?reviewScore | |
FILTER contains(?reviewScore, "%") | |
BIND(xsd:integer(strbefore(?reviewScore, "%")) AS ?score) | |
SERVICE wikibase:label | |
{ bd:serviceParam | |
wikibase:language "[AUTO_LANGUAGE],en" | |
} | |
} | |
ORDER BY DESC(?score) | |
LIMIT 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://query.wikidata.org/bigdata/namespace/wdq/sparql