query-da1faa1679dbf5376a304a8e7a569222

rq turtle/ttl

Propertiespartner in business or sport (P1327)ISU figure skater ID (P2694)identifier shared with (P4070)

Use at

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/>
SELECT ?item ?item2 (CONCAT("A", ?dummy) AS ?id)
WHERE
{
  ?item p:P2694 ?statement ;
        wdt:P1327 ?item2 .
  ?statement ps:P2694 ?dummy .
  ?item2 wdt:P2694 ?dummy .
  FILTER (?item != ?item2)
  FILTER NOT EXISTS { ?statement pq:P4070 ?nothing .}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?dummy"):::projected v6("?id") v3("?item"):::projected v4("?item2"):::projected v2("?nothing") v1("?statement") f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P4070"--> e0v2 e0v2("?nothing"):::projected e0v1("?statement"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"p:qualifier/P4070"--> v2 f1[["?item != ?item2"]] f1 --> v3 f1 --> v4 v3 --"p:P2694"--> v1 v3 --"p:direct/P1327"--> v4 v1 --"p:statement/P2694"--> v5 v4 --"p:direct/P2694"--> v5 bind2[/"concat('A',?dummy)"/] v5 --o bind2 bind2 --as--o v6