query-296f489888a1a444b04a548aa3b7d553
TODO
Use at
- https://query.wikidata.org/sparql
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 ?item ?itemLabel_en ?sitelink ?itemLabel_it
WHERE
{
?item wdt:P106 wd:Q82955 .
?item wdt:P27 wd:Q38 .
?article schema:about ?item ;
schema:name ?sitelink ;
schema:isPartOf <https://it.wikipedia.org/> .
FILTER NOT EXISTS { ?item rdfs:label ?itemLabel_it . filter(lang(?itemLabel_it)="it") }
OPTIONAL { ?item rdfs:label ?itemLabel_en . filter(lang(?itemLabel_en)="en") }
FILTER (str(?itemLabel_en) != str(?sitelink))
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?article")
v4("?item"):::projected
v1("?itemLabel_en"):::projected
v3("?itemLabel_it"):::projected
v2("?sitelink"):::projected
c7(["wd:Q38"]):::iri
c11([https://it.wikipedia.org/]):::iri
c5(["wd:Q82955"]):::iri
f0[["str(?itemLabel_en) != str(?sitelink)"]]
f0 --> v1
f0 --> v2
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0f0[["?itemLabel_it = 'it'"]]
e0f0 --> e0v1
e0v2 --"rdfs:label"--> e0v1
e0v2("?item"):::projected
e0v1("?itemLabel_it"):::projected
end
f1--EXISTS--> f1e0
f1 --> v3
f1 --> v4
f1 --> c2
f2[["?itemLabel_it = 'it'"]]
f2 --> v3
v4 --"rdfs:label"--> v3
v4 --"wdt:P106"--> c5
v4 --"wdt:P27"--> c7
v5 --"schema:about"--> v4
v5 --"schema:name"--> v2
v5 --"schema:isPartOf"--> c11
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v1
end