query-ae0358cef9d7d16f2c72efe90869d2b8
Propertiesinstance of (P31)facet of (P1269)part of (P361)series ordinal (P1545) Sustainable Development Goal (Q53580881) - Sustainable Development Goal Target (Q56724848) - Sustainable Development Goal Indicator (Q56726345) 14:02, 14 December 2019 (UTC)) talk (Ainali respectively. I would expect something like a table with 244 rows (the number of indicators) and then the other ones repeated as needed. (Q56726345)Sustainable Development Goal Indicator and each of those (Q56724848)Sustainable Development Goal Target with each of their (Q53580881)Sustainable Development Goal Could someone help me construct a query that shows all I think i figured it myself now. Here is my query:
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?goalLabel ?goal ?targetLabel ?target ?indicatorLabel ?indicator WHERE {
?indicator wdt:P31 wd:Q56726345;
wdt:P1269 ?target .
?target wdt:P1269 ?goal.
?goal p:P361 ?part.
?part ps:P361 wd:Q7649586;
pq:P1545 ?order .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
ORDER BY ASC (xsd:integer(?order))
Query found at
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/12
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Sustainable_Development
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?goal"):::projected
v2("?indicator"):::projected
v1("?order")
v5("?part")
v3("?target"):::projected
c9(["bd:serviceParam"]):::iri
c2(["wd:Q56726345"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6(["wd:Q7649586"]):::iri
v2 --"p:direct/P31"--> c2
v2 --"p:direct/P1269"--> v3
v3 --"p:direct/P1269"--> v4
v4 --"p:P361"--> v5
v5 --"p:statement/P361"--> c6
v5 --"p:qualifier/P1545"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end