query-bf8c9f12901cdbdc0fe7474b66514fba
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?movie ?title (GROUP_CONCAT (DISTINCT ?genreName_;separator="; ") as ?genreName) ?grossNum ?grossUnit ?duration (MIN(?pubDate_) as ?pubDate )
WHERE {
?movie wdt:P31 wd:Q11424 ; # Instance of film
rdfs:label ?title .
?movie wdt:P136 ?genre .# Genre
?movie p:P2142 ?gross .# Gross revenue
?movie wdt:P577 ?releaseDate .
?genre wdt:P1813 ?genreName_ .
?gross pq:P3005 wd:Q13780930 . # gross only in worldwide
?gross psv:P2142 ?grossValueNode .
?grossValueNode wikibase:quantityAmount ?grossNum.
?grossValueNode wikibase:quantityUnit ?grossUnit.
?movie wdt:P2047 ?duration .
?movie p:P577/psv:P577 ?stat .
?stat wikibase:timeValue ?pubDate_ .
?stat wikibase:timePrecision "11"^^xsd:integer .
FILTER (REGEX(STR(?title), "^[A-Za-z]", "i") && LANG(?title) = "en") .
} GROUP BY ?movie ?title ?grossNum ?grossUnit ?duration
ORDER BY ?title ?pubDate
LIMIT 50
OFFSET 0
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v11("?duration"):::projected
v4("?genre")
v14("?genreName")
v7("?genreName_"):::projected
v5("?gross")
v9("?grossNum"):::projected
v10("?grossUnit"):::projected
v8("?grossValueNode")
v3("?movie"):::projected
v15("?pubDate")
v13("?pubDate_"):::projected
v6("?releaseDate")
v12("?stat")
v1("?title"):::projected
a1((" "))
c21(["11^^xsd:integer"]):::literal
c12(["wd:Q13780930"]):::iri
c5(["wd:Q11424"]):::iri
f0[["regex(str(?title),'^#91;A-Za-z#93;','i')?title = 'en'"]]
f0 --> v1
v3 --"p:direct/P31"--> c5
v3 --"rdfs:label"--> v1
v3 --"p:direct/P136"--> v4
v3 --"p:P2142"--> v5
v3 --"p:direct/P577"--> v6
v4 --"p:direct/P1813"--> v7
v5 --"p:qualifier/P3005"--> c12
v5 --"p:statement/value/P2142"--> v8
v8 --"wikibase:quantityAmount"--> v9
v8 --"wikibase:quantityUnit"--> v10
v3 --"p:direct/P2047"--> v11
v3 --"p:P577"--> a1
a1 --"p:statement/value/P577"--> v12
v12 --"wikibase:timeValue"--> v13
v12 --"wikibase:timePrecision"--> c21
bind3[/"?genreName_"/]
v7 --o bind3
bind3 --as--o v14
bind4[/"min(?pubDate_)"/]
v13 --o bind4
bind4 --as--o v15