Dreams:report-index: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{SPARQL | query= | {{SPARQL | query= | ||
PREFIX target: <https://dreams.wikibase.cloud/entity/Q158> | |||
PREFIX dreams: <https://dreams.wikibase.cloud/entity/> | PREFIX dreams: <https://dreams.wikibase.cloud/entity/> | ||
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> | PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> | ||
PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/> | |||
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/> | |||
SELECT | SELECT | ||
? | ?publication_date | ||
? | ?title ?titleUrl | ||
?miljøportal ?miljøportalUrl | |||
? | |||
WHERE { | WHERE { | ||
?report dreamst:P2 / dreamst:P10* dreams:Q8 . | ?report dreamst:P2 / dreamst:P10* dreams:Q8 . | ||
OPTIONAL { | OPTIONAL { | ||
?report dreamst:P1 ?title . | ?report dreamst:P1 ?title . | ||
BIND(CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?titleUrl) | |||
} | } | ||
OPTIONAL { | OPTIONAL { | ||
?report | ?report dreamsp:P6 / dreamspsv:P6 ?publication_date_value . | ||
?publication_date_value wikibase:timePrecision ?time_precision ; | |||
wikibase:timeValue ?publication_date . | |||
BIND(IF(?time_precision = 9, YEAR(?publication_date), xsd:date(?publication_date)) AS ?value) | |||
} | } | ||
OPTIONAL { | OPTIONAL { | ||
?report dreamst:P40 ? | ?report dreamst:P40 ?miljøportal . | ||
BIND(IRI(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", | BIND(IRI(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", ?miljøportal)) AS ?miljøportalUrl) | ||
} | } | ||
} | } | ||
ORDER BY DESC(? | ORDER BY DESC(?publication_date) | ||
}} | }} |
Revision as of 12:25, 11 August 2022
PREFIX target: <https://dreams.wikibase.cloud/entity/Q158> PREFIX dreams: <https://dreams.wikibase.cloud/entity/> PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/> PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/> SELECT ?publication_date ?title ?titleUrl ?miljøportal ?miljøportalUrl WHERE { ?report dreamst:P2 / dreamst:P10* dreams:Q8 . OPTIONAL { ?report dreamst:P1 ?title . BIND(CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?titleUrl) } OPTIONAL { ?report dreamsp:P6 / dreamspsv:P6 ?publication_date_value . ?publication_date_value wikibase:timePrecision ?time_precision ; wikibase:timeValue ?publication_date . BIND(IF(?time_precision = 9, YEAR(?publication_date), xsd:date(?publication_date)) AS ?value) } OPTIONAL { ?report dreamst:P40 ?miljøportal . BIND(IRI(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", ?miljøportal)) AS ?miljøportalUrl) } } ORDER BY DESC(?publication_date)