query-b33ea9594c5a00942153200d9bdd521c
Temperature and pressure queryI wanted to take a look at all the statements we have for this property so far. But I still get duplicates and I don't know how to get the units in SPARQL:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?value ?pressureValue ?tempValue
WHERE
{
?item wdt:P2118 ?value .
?valueStatement ps:P2118 ?any .
wd:P2077 wikibase:qualifier ?pressureQual .
?valueStatement ?pressureQual ?pressureValue .
wd:P2076 wikibase:qualifier ?tempQual .
?valueStatement ?tempQual ?tempValue .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?any")
v1("?item"):::projected
v5("?pressureQual")
v6("?pressureValue"):::projected
v7("?tempQual")
v8("?tempValue"):::projected
v2("?value"):::projected
v3("?valueStatement")
c7(["bd:serviceParam"]):::iri
c5(["wd:P2076"]):::iri
c9(["en"]):::literal
c3(["wd:P2077"]):::iri
v1 --"wdt:P2118"--> v2
v3 --"ps:P2118"--> v4
c3 --"wikibase:qualifier"--> v5
v3 -->v5--> v6
c5 --"wikibase:qualifier"--> v7
v3 -->v7--> v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end