query-e858761d1eb1eafa84e6ac8405c8f778

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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 DISTINCT ?item ?itemLabel ?item2 ?item2Label 
WHERE 
{
  ?item p:P4224 ?statement .
  ?statement pq:P57 ?person ;
             ps:P4224 ?type .

  ?item2 p:P4224 ?statement2 .
  ?statement2 pq:P57 ?person ;
              ps:P4224 ?type .

  FILTER(?item != ?item2)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,sv,fi,de,pt,lb,ja,ru,pl,uk,eu,nl". }
}
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?item2"):::projected v4("?person") v3("?statement") v6("?statement2") v5("?type") c5(["bd:serviceParam"]):::iri c7(["en,fr,sv,fi,de,pt,lb,ja,ru,pl,uk,eu,nl"]):::literal f0[["?item != ?item2"]] f0 --> v1 f0 --> v2 v1 --"p:P4224"--> v3 v3 --"p:qualifier/P57"--> v4 v3 --"p:statement/P4224"--> v5 v2 --"p:P4224"--> v6 v6 --"p:qualifier/P57"--> v4 v6 --"p:statement/P4224"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end