query-4a65b10e8a63f7407d71f3066e99a3b4

rq turtle/ttl

Duplicate values for P39 15:50, 25 October 2019 (UTC)) talk (Simon VilleneuveSomeone can help me ? .Q3161231#P39. One with qualifiers and the other one without, as on (P39)position held in (Q15964890)member of the House of Commons of Canada I try to find duplicate values of Hi,

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
  ?item p:P39 ?s1 .
  ?s1 ps:P39 wd:Q15964890 .
  FILTER NOT EXISTS {
    ?s1 ?pq1 [] .
    [] wikibase:qualifier ?pq1 .
  }
  ?item p:P39 [ ps:P39 wd:Q15964890; ?pq2 [] ] .
  ?qualifier wikibase:qualifier ?pq2 .
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v2("?pq1") v4("?pq2") v5("?qualifier") v1("?s1") a1((" ")) a2((" ")) a4((" ")) a3((" ")) c4(["wd:Q15964890"]):::iri c6(["bd:serviceParam"]):::iri c8(["en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 -->e0v2--> e0a1 e0a2 --"wikibase:qualifier"--> e0v2 e0v2("?pq1"):::projected e0v1("?s1"):::projected e0a1((" ")):::projected e0a2((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> a1 f0 --> a2 f0 --> c1 v1 -->v2--> a1 a2 --"wikibase:qualifier"--> v2 v3 --"p:P39"--> v1 v1 --"p:statement/P39"--> c4 a3 --"p:statement/P39"--> c4 a3 -->v4--> a4 v3 --"p:P39"--> a3 v5 --"wikibase:qualifier"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end