query-57e3d6bc1bb08afd610e5a386e697a31
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?revenue ?unitLabel ?time
WHERE
{
?item wdt:P31/wdt:P279* wd:Q163740 .
?item p:P2139 ?stat.
?stat psv:P2139/wikibase:quantityAmount ?revenue .
?stat psv:P2139/wikibase:quantityUnit ?unit.
?stat pq:P585 ?time .
FILTER("2017-00-00"^^xsd:date <= ?time &&
?time < "2018-00-00"^^xsd:dat)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v4("?revenue"):::projected
v3("?stat")
v1("?time"):::projected
v5("?unit")
a1((" "))
a2((" "))
a3((" "))
c5(["wd:Q163740"]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["'2017-00-00^^xsd:date' <= ?time?time < s2018-00-00^^<http://www.w3.org/2001/XMLSchema#dat>'"]]
f0 --> v1
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c5
v2 --"p:P2139"--> v3
v3 --"p:statement/value/P2139"--> a2
a2 --"wikibase:quantityAmount"--> v4
v3 --"p:statement/value/P2139"--> a3
a3 --"wikibase:quantityUnit"--> v5
v3 --"p:qualifier/P585"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end