query-c2389025467eb968fc10da1ce53d2d27
title:Same label in two languages SELECT ?item ?enlabel WHERE { ?item wdt:P2358 ?roman_praenomen . ?item rdfs:label ?enlabel . FILTER(LANG(?enlabel) = 'en') . ?item rdfs:label ?calabel . FILTER(LANG(?calabel) = 'ca') . FILTER(STR(?enlabel) = STR(?calabel)) . #OPTIONAL { ?item rdfs:label ?lalabel . FILTER(LANG(?lalabel) = 'la') . } FILTER(!BOUND(?lalabel)) . } ORDER BY ?enlabel
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#title:Same label in two languages
SELECT ?item ?enlabel WHERE {
?item wdt:P2358 ?roman_praenomen .
?item rdfs:label ?enlabel .
FILTER(LANG(?enlabel) = 'en') .
?item rdfs:label ?calabel .
FILTER(LANG(?calabel) = 'ca') .
FILTER(STR(?enlabel) = STR(?calabel)) .
#OPTIONAL { ?item rdfs:label ?lalabel . FILTER(LANG(?lalabel) = 'la') . } FILTER(!BOUND(?lalabel)) .
}
ORDER BY ?enlabel
Query found at
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/Queries
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/sandbox
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?calabel")
v1("?enlabel"):::projected
v3("?item"):::projected
v4("?roman_praenomen")
f0[["str(?enlabel) = str(?calabel)"]]
f0 --> v1
f0 --> v2
f1[["?calabel = 'ca'"]]
f1 --> v2
f2[["?enlabel = 'en'"]]
f2 --> v1
v3 --"wdt:P2358"--> v4
v3 --"rdfs:label"--> v1
v3 --"rdfs:label"--> v2