query-d8c00ae4fd3535ebc64210ee0b0c3bf6

rq turtle/ttl

Comparison of labels on a set of items), but the following times out, also with very low LIMIT (e.g. 10): (P396)SBN author ID in two columns (with optional (P214)VIAF ID Hi! I have tried to see homonym Italian people with

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?i1 ?s1 ?i2 ?s2
WHERE {
  VALUES ?v { wd:Q172579 wd:Q38 } .
  ?i1 wdt:P27 ?v ; wdt:P214 [] ; rdfs:label ?l1 . FILTER(LANG(?l1 = "it"))
  ?i2 wdt:P27 ?v ; wdt:P214 [] ; rdfs:label ?l2 . FILTER(LANG(?l2 = "it"))
  FILTER(?l1 = ?l2)
  OPTIONAL { ?i1 wdt:P396 ?s1 } .
  OPTIONAL { ?i2 wdt:P396 ?s2 } .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?i1"):::projected v5("?i2"):::projected v1("?l1") v2("?l2") v6("?s1"):::projected v7("?s2"):::projected v3("?v") a1((" ")) a2((" ")) f0[["?l1 = ?l2"]] f0 --> v1 f0 --> v2 f1[["?l2 = 'it'"]] f1 --> v2 f2[["?l1 = 'it'"]] f2 --> v1 bind3[/VALUES ?v/] bind3-->v3 bind30(["wd:Q172579"]) bind30 --> bind3 bind31(["wd:Q38"]) bind31 --> bind3 v4 --"wdt:P27"--> v3 v4 --"wdt:P214"--> a1 v4 --"rdfs:label"--> v1 v5 --"wdt:P27"--> v3 v5 --"wdt:P214"--> a2 v5 --"rdfs:label"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P396".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P396".-> v7 end