query-c7f6c3155fe2a0f1b957f68d02711760
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item1 ?item1Label ?item2 ?item2Label ?viaf (URI(REPLACE(?formatter, '\\$1', ?viaf)) AS ?url)
WHERE
{
{
SELECT * {
?item1 wdt:P214/^wdt:P214 ?item2 .
FILTER( STR( ?item1 ) < STR( ?item2 ) ) .
} LIMIT 1000
}.
{
SELECT * { wd:P214 wdt:P1630 ?formatter } LIMIT 1
}.
?item1 wdt:P214 ?viaf .
?item2 wdt:P214 ?viaf .
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;
v3("?formatter"):::projected
v1("?item1"):::projected
v2("?item2"):::projected
v5("?url")
v4("?viaf"):::projected
a1((" "))
c2(["wd:P214"]):::iri
c5(["bd:serviceParam"]):::iri
c7(["en"]):::literal
f0[["str(?item1) < str(?item2)"]]
f0 --> v1
f0 --> v2
v1 --"wdt:P214"--> a1
v2 --"wdt:P214"--> a1
c2 --"wdt:P1630"--> v3
v1 --"wdt:P214"--> v4
v2 --"wdt:P214"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind1[/"replace(?formatter,'\$1',?viaf)"/]
v3 --o bind1
v4 --o bind1
bind1 --as--o v5