query-d6f893ce30b05114dbfe38077e4a978e
Things that are named after Armenian citiziens or people born in Armenia SELECT ?item ?itemLabel ?person ?personLabel WHERE { { ?item wdt:P138 ?person . ?person wdt:P27 wd:Q399 } UNION { ?item wdt:P138 ?person . ?person wdt:P19 ?place . ?place wdt:P17 wd:Q399 . } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
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#>
# Things that are named after Armenian citiziens or people born in Armenia
SELECT ?item ?itemLabel ?person ?personLabel WHERE {
{
?item wdt:P138 ?person .
?person wdt:P27 wd:Q399
}
UNION
{
?item wdt:P138 ?person .
?person wdt:P19 ?place .
?place wdt:P17 wd:Q399 .
}
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;
v1("?item"):::projected
v2("?person"):::projected
v3("?place")
c3(["wd:Q399"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P138"--> v2
v2 --"wdt:P19"--> v3
v3 --"wdt:P17"--> c3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P138"--> v2
v2 --"wdt:P27"--> c3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end