query-29b006befbe244c3bc3ec93d79bbd65e

rq turtle/ttl

Give me all chemical compounds or elements with melting points (in Celsius)!

Use at

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?p ?pLabel ?value ?unitLabel
WHERE 
{
  {?p wdt:P31 wd:Q11173} UNION {?p wdt:P31 wd:Q11344} 
  ?p          p:P2101                     ?stmnode.
  ?stmnode       psv:P2101                   ?valuenode.
  ?valuenode     wikibase:quantityAmount     ?value.
  ?valuenode     wikibase:quantityUnit       ?unit.
  ?valuenode     wikibase:quantityUnit       wd:Q25267 .   # in Celsius only
  ?valuenode     wikibase:quantityLowerBound ?lowerbound.
  ?valuenode     wikibase:quantityUpperBound ?upperbound.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" . }
} ORDER BY ASC(?value)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?lowerbound") v2("?p"):::projected v3("?stmnode") v5("?unit") v7("?upperbound") v1("?value"):::projected v4("?valuenode") c8(["wd:Q25267"]):::iri c12(["bd:serviceParam"]):::iri c2(["wd:Q11173"]):::iri c14(["de,en"]):::literal c3(["wd:Q11344"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P31"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P31"--> c2 end union0r <== or ==> union0l end v2 --"p:P2101"--> v3 v3 --"p:statement/value/P2101"--> v4 v4 --"wikibase:quantityAmount"--> v1 v4 --"wikibase:quantityUnit"--> v5 v4 --"wikibase:quantityUnit"--> c8 v4 --"wikibase:quantityLowerBound"--> v6 v4 --"wikibase:quantityUpperBound"--> v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end