query-5f7fce59c8b1429558383cc9f9e81953
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 schema: <http://schema.org/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?itemLabel ?article ?Rnumber ?globalwarmthpotential ?boilingpoint ?meltingpoint ?sicherheitsgruppeLabel ?item
WHERE
{
?item wdt:P4842 ?Rnumber.
OPTIONAL{
?article schema:about ?item;
schema:isPartOf <https://de.wikipedia.org/>.
}
OPTIONAL{
SELECT ?item (MIN(?allgwp) as ?globalwarmthpotential)
WHERE {
?item wdt:P2565 ?allgwp.
} GROUP BY ?item
}
OPTIONAL{
?item p:P2102 ?statement_boilingpoint.
?statement_boilingpoint psv:P2102 ?valuenode_boilingpoint.
?valuenode_boilingpoint wikibase:quantityAmount ?boilingpoint;
wikibase:quantityUnit ?unit_boilingpoint.
FILTER(?unit_boilingpoint = wd:Q25267)
}
OPTIONAL{
?item p:P2101 ?statement_meltingpoint.
?statement_meltingpoint psv:P2101 ?valuenode_meltingpoint.
?valuenode_meltingpoint wikibase:quantityAmount ?meltingpoint;
wikibase:quantityUnit ?unit_meltingpoint.
FILTER(?unit_meltingpoint = wd:Q25267)
}
Optional{
?item wdt:P5009 ?sicherheitsgruppe.
?sicherheitsgruppe wdt:P31 wd:Q117757747.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
#Only use main number to sort
BIND(xsd:integer(REPLACE(?Rnumber,
"[a-zA-Z]?([0-9]{2,4})[a-zA-Z]?[0-9a-z]?(?:[(][a-zA-Z][)])?",
"$1")) as ?sortnumber)
} ORDER BY ASC(?sortnumber)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?Rnumber"):::projected
v7("?allgwp")
v6("?article"):::projected
v11("?boilingpoint"):::projected
v8("?globalwarmthpotential"):::projected
v4("?item"):::projected
v14("?meltingpoint"):::projected
v15("?sicherheitsgruppe")
v16("?sortnumber")
v9("?statement_boilingpoint")
v12("?statement_meltingpoint")
v3("?unit_boilingpoint")
v2("?unit_meltingpoint")
v10("?valuenode_boilingpoint")
v13("?valuenode_meltingpoint")
c5([https://de.wikipedia.org/]):::iri
c15(["wd:Q117757747"]):::iri
c17(["bd:serviceParam"]):::iri
c19(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v4 --"p:direct/P4842"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:about".-> v4
v6 --"schema:isPartOf"--> c5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P2565".-> v7
bind1[/"min(?allgwp)"/]
v7 --o bind1
bind1 --as--o v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:P2102".-> v9
v9 --"p:statement/value/P2102"--> v10
v10 --"wikibase:quantityAmount"--> v11
v10 --"wikibase:quantityUnit"--> v3
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:P2101".-> v12
v12 --"p:statement/value/P2101"--> v13
v13 --"wikibase:quantityAmount"--> v14
v13 --"wikibase:quantityUnit"--> v2
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P5009".-> v15
v15 --"p:direct/P31"--> c15
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c17 --"wikibase:language"--> c19
end
bind2[/"http://www.w3.org/2001/XMLSchema#integer(replace(?Rnumber,'#91;a-zA-Z#93;?(#91;0-9#93;{2,4})#91;a-zA-Z#93;?#91;0-9a-z#93;?(?:#91;(#93;#91;a-zA-Z#93;#91;)#93;)?','$1'))"/]
v5 --o bind2
bind2 --as--o v16