query-668f66c02252a34eeaf0a8e1e0d71acd

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?partyLabel  where
{
   {
  select DISTINCT ?item (count(?party) as ?partycount) WHERE {
  ?item p:P39 ?statement.
  ?statement ps:P39 wd:Q17781726.
  ?statement pq:P2937 wd:Q30544772 .
  ?item wdt:P102 ?party.
  MINUS { ?statement pq:P4100 ?group } .
} group by ?item having (?partycount=1) }  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?group") v2("?item"):::projected v4("?party") v6("?partycount") v3("?statement") c12(["#91;AUTO_LANGUAGE#93;,de"]):::literal c10(["bd:serviceParam"]):::iri c4(["wd:Q17781726"]):::iri c6(["wd:Q30544772"]):::iri f0[["?partycount = '1^^xsd:integer'"]] f0 --> v6 v2 --"p:P39"--> v3 v3 --"p:statement/P39"--> c4 v3 --"p:qualifier/P2937"--> c6 v2 --"p:direct/P102"--> v4 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"p:qualifier/P4100"--> v5 end bind3[/"count(?party)"/] v4 --o bind3 bind3 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end