query-a245bd6445de9765559c7a466f396d5c

rq turtle/ttl

Единицы СИ select ?unit (sample(?label) as ?label) (sample(?desc) as ?desc) (sample(?conversion) as ?conversion) (sample(?symbol) as ?symbol) (group_concat(distinct ?quantity; separator = "; ") as ?quantities) where { ?unit wdt:P31 / wdt:P279* wd:Q69197847 . # coherent SI unit optional { ?unit rdfs:label ?label . filter (lang(?label) = "en") } optional { ?unit schema:description ?desc . filter (lang(?desc) = "en") }

optional { ?unit wdt:P2370 ?conversion } # 1 for every coherent SI unit optional { ?unit wdt:P5061 ?symbol . filter (lang(?symbol) = "en") } optional { ?unit wdt:P111 / rdfs:label ?quantity . filter (lang(?quantity) = "en") } } group by ?unit

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#Единицы СИ
select
  ?unit (sample(?label) as ?label) (sample(?desc) as ?desc)
  (sample(?conversion) as ?conversion) (sample(?symbol) as ?symbol)
  (group_concat(distinct ?quantity; separator = "; ") as ?quantities)
where {
  ?unit wdt:P31 / wdt:P279* wd:Q69197847 .       # coherent SI unit
  optional { ?unit rdfs:label ?label . filter (lang(?label) = "en") }
  optional { ?unit schema:description ?desc . filter (lang(?desc) = "en") }

  optional { ?unit wdt:P2370 ?conversion }       # 1 for every coherent SI unit
  optional { ?unit wdt:P5061 ?symbol . filter (lang(?symbol) = "en") }
  optional { ?unit wdt:P111 / rdfs:label ?quantity . filter (lang(?quantity) = "en") }
} group by ?unit

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?conversion"):::projected v7("?desc"):::projected v7("?label"):::projected v7("?quantities") v1("?quantity"):::projected v7("?symbol"):::projected v5("?unit"):::projected a1((" ")) a2((" ")) c4(["wd:Q69197847"]):::iri v5 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."schema:description".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P2370".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P5061".-> v7 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P111".-> a2 a2 --"rdfs:label"--> v1 end bind5[/"sample(?label)"/] v7 --o bind5 bind5 --as--o v7 bind6[/"sample(?desc)"/] v7 --o bind6 bind6 --as--o v7 bind7[/"sample(?conversion)"/] v7 --o bind7 bind7 --as--o v7 bind8[/"sample(?symbol)"/] v7 --o bind8 bind8 --as--o v7 bind9[/"?quantity"/] v1 --o bind9 bind9 --as--o v7