Dreams:sdg-index: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→SDGs) |
||
Line 1: | Line 1: | ||
== | == Verndersmål == | ||
{{SPARQL | query= | {{SPARQL | query= | ||
PREFIX dreams: <https://dreams.wikibase.cloud/entity/> | PREFIX dreams: <https://dreams.wikibase.cloud/entity/> | ||
Line 5: | Line 5: | ||
SELECT | SELECT | ||
? | ?antal | ||
? | ?mål ?målLabel | ||
(CONCAT("#sdg/", SUBSTR(STR(? | (CONCAT("#sdg/", SUBSTR(STR(?mål), 38)) AS ?målUrl) | ||
? | ?målDescription | ||
WITH { | WITH { | ||
SELECT | SELECT | ||
(COUNT(?item) AS ? | (COUNT(?item) AS ?antal) | ||
? | ?mål | ||
WHERE { | WHERE { | ||
{ ? | { ?mål dreamst:P2 dreams:Q22 . } | ||
UNION | UNION | ||
{ ? | { ?mål dreamst:P2 dreams:Q5594 . } | ||
OPTIONAL { ?item dreamst:P42 ? | OPTIONAL { ?item dreamst:P42 ?mål . } | ||
} | } | ||
GROUP BY ? | GROUP BY ?mål | ||
} AS %result | } AS %result | ||
WHERE { | WHERE { | ||
Line 26: | Line 26: | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } | ||
} | } | ||
ORDER BY DESC(? | ORDER BY DESC(?antal) | ||
}} | }} |
Revision as of 13:02, 9 December 2022
Verndersmål
PREFIX dreams: <https://dreams.wikibase.cloud/entity/> PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> SELECT ?antal ?mål ?målLabel (CONCAT("#sdg/", SUBSTR(STR(?mål), 38)) AS ?målUrl) ?målDescription WITH { SELECT (COUNT(?item) AS ?antal) ?mål WHERE { { ?mål dreamst:P2 dreams:Q22 . } UNION { ?mål dreamst:P2 dreams:Q5594 . } OPTIONAL { ?item dreamst:P42 ?mål . } } GROUP BY ?mål } AS %result WHERE { INCLUDE %result SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } } ORDER BY DESC(?antal)