query-6e19080695423e856501798e7945cc65

rq turtle/ttl

Things that planets and their moons are named after

Use at

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 ?planet ?planetLabel ?planetDescription ?nom ?nomLabel ?nomDescription
WHERE {
    ?planet wdt:P31/wdt:P279* wd:Q3132741 .
    ?planet wdt:P138 ?nom.
  ?planet wdt:P397 ?parent.
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }.
} ORDER BY DESC(?parent)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?nom"):::projected v1("?parent") v2("?planet"):::projected a1((" ")) c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q3132741"]):::iri v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v2 --"wdt:P138"--> v3 v2 --"wdt:P397"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end