Dreams:author: Difference between revisions

From DREAMS
Jump to navigation Jump to search
(publication_date)
 
Line 1: Line 1:
== Reports ==
== Rapporter ==
{{SPARQL | query=  
{{SPARQL | query=  
PREFIX target: <https://dreams.wikibase.cloud/entity/Q222>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q222>
Line 8: Line 8:


SELECT  
SELECT  
   ?publication_date
   ?udgivelsesdato
   ?report ?reportLabel ?reportUrl
   ?rapport ?rapportLabel ?rapportUrl
WHERE {
WHERE {
   ?report dreamst:P24 target: .
   ?rapport dreamst:P24 target: .
   BIND(CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)
   BIND(CONCAT("#report/", SUBSTR(STR(?rapport), 38)) AS ?rapportUrl)


   OPTIONAL {
   OPTIONAL {
     ?report dreamsp:P6 / dreamspsv:P6 ?publication_date_value .
     ?rapport dreamsp:P6 / dreamspsv:P6 ?udgivelsesdato_value .
     ?publication_date_value wikibase:timePrecision ?time_precision ;
     ?udgivelsesdato_value wikibase:timePrecision ?time_precision ;
                             wikibase:timeValue ?publication_date_ .
                             wikibase:timeValue ?udgivelsesdato_ .
     BIND(IF(?time_precision = 9, YEAR(?publication_date_), xsd:date(?publication_date_)) AS ?publication_date)
     BIND(IF(?time_precision = 9, YEAR(?udgivelsesdato_), xsd:date(?udgivelsesdato_)) AS ?udgivelsesdato)
   }
   }


   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
}
ORDER BY DESC(?publication_date)
ORDER BY DESC(?udgivelsesdato)
}}
}}

Latest revision as of 13:29, 9 December 2022

Rapporter

PREFIX target: <https://dreams.wikibase.cloud/entity/Q222>
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 
  ?udgivelsesdato
  ?rapport ?rapportLabel ?rapportUrl
WHERE {
  ?rapport dreamst:P24 target: .
  BIND(CONCAT("#report/", SUBSTR(STR(?rapport), 38)) AS ?rapportUrl)

  OPTIONAL {
    ?rapport dreamsp:P6 / dreamspsv:P6 ?udgivelsesdato_value .
    ?udgivelsesdato_value wikibase:timePrecision ?time_precision ;
                            wikibase:timeValue ?udgivelsesdato_ .
    BIND(IF(?time_precision = 9, YEAR(?udgivelsesdato_), xsd:date(?udgivelsesdato_)) AS ?udgivelsesdato)
  }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
ORDER BY DESC(?udgivelsesdato)