query-382ff63ccd8948ca931ca8718837f185

rq turtle/ttl

PropertiesISU figure skater ID (P2694)identifier shared with (P4070)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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 ?item2 ?item2Label (CONCAT("A", ?dummy) AS ?id)
WHERE
{
  ?item p:P2694 ?statement .
  ?statement ps:P2694 ?dummy .
  ?statement pq:P4070 ?item2 .
  FILTER NOT EXISTS { ?item2 wdt:P2694 ?dummy .}
  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; v2("?dummy"):::projected v5("?id") v3("?item"):::projected v1("?item2"):::projected v4("?statement") c6(["bd:serviceParam"]):::iri c8(["en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P2694"--> e0v2 e0v2("?dummy"):::projected e0v1("?item2"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"p:direct/P2694"--> v2 v3 --"p:P2694"--> v4 v4 --"p:statement/P2694"--> v2 v4 --"p:qualifier/P4070"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end bind1[/"concat('A',?dummy)"/] v2 --o bind1 bind1 --as--o v5