query-ce32d30318558852bb20848c2b9604d1

rq turtle/ttl

Physical Constants

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
select
  ?const
  (sample(?label) as ?label)
  (sample(?symbol) as ?symbol)
  (sample(?value) as ?value)
  (sample(?unit) as ?unit)
  (sample(?codata) as ?codata)
  (sample(?qudt) as ?qudt)
  (sample(?wl) as ?wl)
  (sample(?ucum) as ?ucum)
where {
  ?const wdt:P31 wd:Q173227 .
  optional { ?const rdfs:label ?label . filter (lang(?label) = "en") }
  optional { ?const wdt:P7973 ?symbol . }
  optional {
    ?const p:P1181 [
      a wikibase:BestRank ;
      psv:P1181 [ wikibase:quantityAmount ?value ; wikibase:quantityUnit / wdt:P5061 ?unit ] ;
    ] .
    filter (lang(?unit) = "en")
  }
  optional {
    ?const wdt:P1645 ?codataVal .
    wd:P1645 wdt:P1630 ?codataTemplate .
    bind (
      strdt(
        concat("<", "math><mtext href='", replace(?codataTemplate, "\\$1", ?codataVal), "'>", ?codataVal, "</mtext></math>"),
        <http://www.w3.org/1998/Math/MathML>
      ) as ?codata
    )
  }
  optional {
    ?const wdt:P2968 ?qudtVal .
    ?const wdtn:P2968 ?qudtURI .
    bind (
      strdt(
        concat("<", "math><mtext href='", str(?qudtURI), "'>", ?qudtVal, "</mtext></math>"),
        <http://www.w3.org/1998/Math/MathML>
      ) as ?qudt
    )
  }
  optional { ?const wdt:P7007 ?wl . }
  optional { ?const wdt:P7825 ?ucum . }
} group by ?const

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v14("?codata"):::projected v7("?codataTemplate") v6("?codataVal") v3("?const"):::projected v14("?label"):::projected v14("?qudt"):::projected v10("?qudtURI") v9("?qudtVal") v14("?symbol"):::projected v14("?ucum"):::projected v14("?unit"):::projected v14("?value"):::projected v14("?wl"):::projected a1((" ")) a2((" ")) a3((" ")) c7(["wikibase:BestRank"]):::iri c14(["wd:P1645"]):::iri c3(["wd:Q173227"]):::iri v3 --"p:direct/P31"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v14 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P7973".-> v14 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; a1 -."a".-> c7 a2 --"wikibase:quantityAmount"--> v14 a2 --"wikibase:quantityUnit"--> a3 a3 --"p:direct/P5061"--> v14 a1 --"p:statement/value/P1181"--> a2 v3 --"p:P1181"--> a1 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P1645".-> v6 c14 --"p:direct/P1630"--> v7 bind0[/"STRDT(concat('<','math><mtext href='',replace(?codataTemplate,'\$1',?codataVal),''>',?codataVal,'</mtext></math>'),http://www.w3.org/1998/Math/MathML)"/] v7 --o bind0 v6 --o bind0 bind0 --as--o v14 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P2968".-> v9 v3 --"p:direct-normalized/P2968"--> v10 bind1[/"STRDT(concat('<','math><mtext href='',str(?qudtURI),''>',?qudtVal,'</mtext></math>'),http://www.w3.org/1998/Math/MathML)"/] v10 --o bind1 v9 --o bind1 bind1 --as--o v14 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P7007".-> v14 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P7825".-> v14 end bind10[/"sample(?label)"/] v14 --o bind10 bind10 --as--o v14 bind11[/"sample(?symbol)"/] v14 --o bind11 bind11 --as--o v14 bind12[/"sample(?value)"/] v14 --o bind12 bind12 --as--o v14 bind13[/"sample(?unit)"/] v14 --o bind13 bind13 --as--o v14 bind14[/"sample(?codata)"/] v14 --o bind14 bind14 --as--o v14 bind15[/"sample(?qudt)"/] v14 --o bind15 bind15 --as--o v14 bind16[/"sample(?wl)"/] v14 --o bind16 bind16 --as--o v14 bind17[/"sample(?ucum)"/] v14 --o bind17 bind17 --as--o v14