query-6c97237ddc1bc673b3a1e8cdbe7ca623

rq turtle/ttl

带图例

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?deathNumber ?aircraftLabel ?geo ?date ?layer WHERE {
  ?item (wdt:P31/(wdt:P279*)) wd:Q744913.
  OPTIONAL {
    ?item wdt:P121 ?aircraft;
      wdt:P585 ?date;
      wdt:P625 ?geo;
      wdt:P1120 ?deathNumber.
  }
  BIND (
    IF(?deathNumber <=1, "<=1",
    IF(?deathNumber <=5, "1,5",
    IF(?deathNumber <=10, "5,10",
    IF(?deathNumber <=50, "10,50",
    ">=50"))))
    AS ?layer)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],zh". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?aircraft") v3("?date"):::projected v5("?deathNumber"):::projected v4("?geo"):::projected v1("?item"):::projected v6("?layer"):::projected a1((" ")) c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,zh"]):::literal c3(["wd:Q744913"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P121".-> v2 v1 --"wdt:P585"--> v3 v1 --"wdt:P625"--> v4 v1 --"wdt:P1120"--> v5 end bind0[/"if(?deathNumber <= '1^^xsd:integer','<=1',if(?deathNumber <= '5^^xsd:integer','1,5',if(?deathNumber <= '10^^xsd:integer','5,10',if(?deathNumber <= '50^^xsd:integer','10,50','>=50'))))"/] v5 --o bind0 bind0 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end