query-25b1dbf5a269f38ed27f5e64a1e85a3a
TODO
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?link ?linkLabel ?typeLabel ?distance ?distanceUnitLabel ?discovered ?constellationLabel ?image
WHERE
{
?link wdt:P31/wdt:P279*/wdt:P31* wd:Q17444909.
{ ?link wdt:P18 ?image }
OPTIONAL { ?link wdt:P31 ?type }
OPTIONAL {?link p:P2583/psv:P2583 [ wikibase:quantityAmount ?distance; wikibase:quantityUnit ?distanceUnit ]}
OPTIONAL { ?link wdt:P575 ?discovered }
OPTIONAL { ?link wdt:P59 ?constellation }
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;
v7("?constellation")
v6("?discovered"):::projected
v4("?distance"):::projected
v5("?distanceUnit")
v2("?image"):::projected
v1("?link"):::projected
v3("?type")
a1((" "))
a2((" "))
a4((" "))
a3((" "))
c3(["wd:Q17444909"]):::iri
c14(["en"]):::literal
c12(["bd:serviceParam"]):::iri
v1 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> a2
a2 --"p:direct/P31"--> c3
v1 --"p:direct/P18"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a3 -."wikibase:quantityAmount".-> v4
a3 --"wikibase:quantityUnit"--> v5
v1 --"p:P2583"--> a4
a4 --"p:statement/value/P2583"--> a3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P575".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P59".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end