query-81006a2afbfb38879bfc57cab0f2e8de
MERGE
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item1 ?item2 WHERE {
?item1 wdt:P31 wd:Q490329.
?item2 wdt:P31 wd:Q490329.
?item1 wdt:P131 ?P1311.
?item2 wdt:P131 ?P1312.
FILTER(?P1311 = ?P1312)
#F̶I̶L̶T̶E̶R̶(̶(̶?̶i̶t̶e̶m̶1̶ ̶!̶=̶ ̶?̶i̶t̶e̶m̶2̶)̶ ̶&̶&̶ ̶(̶(̶S̶T̶R̶(̶?̶i̶t̶e̶m̶1̶)̶)̶ ̶<̶ ̶(̶S̶T̶R̶(̶?̶i̶t̶e̶m̶2̶)̶)̶)̶)
FILTER(xsd:integer(STRAFTER(STR(?item1), 'Q')) < xsd:integer(STRAFTER(STR(?item2), 'Q'))) .
?article1 schema:about ?item1;
schema:isPartOf <https://ko.wikipedia.org/>.
?article2 schema:about ?item2;
schema:isPartOf <https://sv.wikipedia.org/>.
?item1 rdfs:label ?label1.
FILTER((LANG(?label1)) = "ko")
?item2 rdfs:label ?label2.
FILTER((LANG(?label2)) = "ko")
FILTER(?label1 = ?label2)
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?P1311")
v6("?P1312")
v7("?article1")
v8("?article2")
v3("?item1"):::projected
v4("?item2"):::projected
v1("?label1")
v2("?label2")
c4(["wd:Q490329"]):::iri
c8([https://ko.wikipedia.org/]):::iri
c9([https://sv.wikipedia.org/]):::iri
f0[["?label1 = ?label2"]]
f0 --> v1
f0 --> v2
f1[["?label2 = 'ko'"]]
f1 --> v2
f2[["?label1 = 'ko'"]]
f2 --> v1
f3[["http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item1),'Q')) < http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item2),'Q'))"]]
f3 --> v3
f3 --> v4
f4[["?P1311 = ?P1312"]]
f4 --> v5
f4 --> v6
v3 --"wdt:P31"--> c4
v4 --"wdt:P31"--> c4
v3 --"wdt:P131"--> v5
v4 --"wdt:P131"--> v6
v7 --"schema:about"--> v3
v7 --"schema:isPartOf"--> c8
v8 --"schema:about"--> v4
v8 --"schema:isPartOf"--> c9
v3 --"rdfs:label"--> v1
v4 --"rdfs:label"--> v2