query-31a592a1d877b376058effb296131f50

rq turtle/ttl

Items with more than one number of deaths (P1120)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?count
WHERE
{
  {
    SELECT ?item (COUNT(DISTINCT ?deaths) AS ?count) WHERE {
      ?item wdt:P1120 ?deaths .
    }
    GROUP BY ?item
  }
  FILTER ( ?count > 1 )
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
ORDER BY DESC(?count) ?itemL

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count"):::projected v4("?deaths") v3("?item"):::projected v2("?itemL") c4(["bd:serviceParam"]):::iri c6(["en"]):::literal f0[["?count > '1^^xsd:integer'"]] f0 --> v5 v3 --"wdt:P1120"--> v4 bind2[/"count(?deaths)"/] v4 --o bind2 bind2 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end