query-5f012c7ecf47c7be323e475252b9100e
Propertiesinstance of (P31)subclass of (P279)named after (P138)
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 DISTINCT ?obj ?objLabel ?objDescription ?nom ?nomLabel ?nomDescription
WHERE {
{?obj wdt:P31/wdt:P279* wd:Q40218} # type of spacecraft
UNION {?obj wdt:P31/wdt:P279* wd:Q13226541}. # or spaceflight programme
?obj wdt:P138 ?nom #named after
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" }
} ORDER BY ASC(?objLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?nom"):::projected
v2("?obj"):::projected
v1("?objLabel"):::projected
a1((" "))
a2((" "))
c3(["wd:Q40218"]):::iri
c7(["bd:serviceParam"]):::iri
c4(["wd:Q13226541"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
end
union0r <== or ==> union0l
end
v2 --"wdt:P138"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end