query-328a45a9cbd8ab48871def79b2274622

rq turtle/ttl

TODO

Use at

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 ?catalog1 ?catalogCode1 ?catalog2 ?catalogCode2 ?sameCatalog ?sameCatalogCode {
  ?item p:P972 [ ps:P972 ?catalog1; pq:P528 ?catalogCode1 ]; p:P528 [ ps:P528 ?catalogCode2; pq:P972 ?catalog2 ] .
  BIND((?catalog1 = ?catalog2) AS ?sameCatalog) .
  BIND((?catalogCode1 = ?catalogCode2) AS ?sameCatalogCode) .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?catalog1"):::projected v5("?catalog2"):::projected v2("?catalogCode1"):::projected v4("?catalogCode2"):::projected v3("?item"):::projected v6("?sameCatalog"):::projected v7("?sameCatalogCode"):::projected a1((" ")) a2((" ")) a1 --"p:statement/P972"--> v1 a1 --"p:qualifier/P528"--> v2 v3 --"p:P972"--> a1 a2 --"p:statement/P528"--> v4 a2 --"p:qualifier/P972"--> v5 v3 --"p:P528"--> a2 bind0[/"?catalog1 = ?catalog2"/] v1 --o bind0 v5 --o bind0 bind0 --as--o v6 bind1[/"?catalogCode1 = ?catalogCode2"/] v2 --o bind1 v4 --o bind1 bind1 --as--o v7