Dreams:report
Jump to navigation
Jump to search
Report
PREFIX target: <https://dreams.wikibase.cloud/entity/Q158> PREFIX dreams: <https://dreams.wikibase.cloud/entity/> PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> SELECT DISTINCT ?description ?value ?valueUrl WHERE { BIND(target: AS ?work) { BIND(1 AS ?order) BIND("Title" AS ?description) ?work dreamst:P1 ?value . } UNION { BIND(2 AS ?order) BIND("Author" AS ?description) target: dreamst:P24 ?iri . BIND(SUBSTR(STR(?iri), 38) AS ?q) ?iri rdfs:label ?value . FILTER (LANG(?value) = 'da') BIND(CONCAT("/#author/", ?q) AS ?valueUrl) } UNION { BIND(2.5 AS ?order) BIND("Language" AS ?description) ?work dreamst:P11 ?iri . ?iri rdfs:label ?value_string . FILTER (LANG(?value_string) = 'da') BIND(STR(?value_string) AS ?value) } UNION { BIND(6 AS ?order) BIND("Publication date" AS ?description) ?work p:P6 / psv: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) } UNION { BIND(7 AS ?order) BIND("Publisher" AS ?description) ?work dreamst:P26 ?iri . BIND(SUBSTR(STR(?iri), 38) AS ?q) ?iri rdfs:label ?value_string . FILTER (LANG(?value_string) = 'da') BIND(COALESCE(?value_string, ?q) AS ?value) BIND(CONCAT("/#publisher/", ?q) AS ?valueUrl) } UNION { SELECT (8 AS ?order) ("Topics" AS ?description) (GROUP_CONCAT(?value_; separator=", ") AS ?value) (CONCAT("/#topics/", GROUP_CONCAT(?q; separator=",")) AS ?valueUrl) { BIND(1 AS ?dummy) target: wdt:P921 ?iri . BIND(SUBSTR(STR(?iri), 38) AS ?q) ?iri rdfs:label ?value_string . FILTER (LANG(?value_string) = 'da') BIND(COALESCE(?value_string, ?q) AS ?value_) } GROUP BY ?dummy } UNION { BIND(12 AS ?order) BIND("Miljøportal" AS ?description) ?work dreamst:P40 ?value_ . BIND(CONCAT(STR(?value_), " ↗") AS ?value) BIND(CONCAT("https://daieproddreamspdfsto.blob.core.windows.net/files/", STR(?value_)) AS ?valueUrl) } } ORDER BY ?order