query-0a9806e6cdde912d18e1ff03a6f5fc9c

rq turtle/ttl

Bouzinac

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?essai_nucl_aire ?essai_nucl_aireLabel ?date ?op_rateur ?op_rateurLabel ?_quivalent_d__nergie_explosive
WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?essai_nucl_aire wdt:P31 wd:Q210112.
  OPTIONAL { ?essai_nucl_aire wdt:P585 ?date. }
  OPTIONAL { ?essai_nucl_aire wdt:P137 ?op_rateur. }
  OPTIONAL {
    ?essai_nucl_aire p:P2145 ?yield_statement.
    ?yield_statement a wikibase:BestRank. # Use only best rank, like if using the wdt:P2145 predicate
    ?yield_statement psn:P2145 / wikibase:quantityAmount ?joule. # Yield in joule (normalized quantity) 
    BIND (?joule / 4184000000 AS ?_quivalent_d__nergie_explosive) # Convert joule to Q98391507 (tonne de TNT)
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?_quivalent_d__nergie_explosive"):::projected v2("?date"):::projected v1("?essai_nucl_aire"):::projected v5("?joule") v3("?op_rateur"):::projected v4("?yield_statement") a1((" ")) c6(["wd:Q210112"]):::iri c11(["wikibase:BestRank"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:direct/P31"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P585".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P137".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P2145".-> v4 v4 --"a"--> c11 v4 --"p:statement/value-normalized/P2145"--> a1 a1 --"wikibase:quantityAmount"--> v5 bind0[/"?joule / '4184000000^^xsd:integer'"/] v5 --o bind0 bind0 --as--o v6 end