Dreams:projecttype-effect-index

From DREAMS
Revision as of 20:04, 8 December 2022 by Fnielsen (talk | contribs)
Jump to navigation Jump to search

Effects

PREFIX target: <https://dreams.wikibase.cloud/entity/Q5580>
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
  ?number_of_patterns

  ?effect ?effectLabel
  (CONCAT("#effect/", SUBSTR(STR(?effect), 38)) AS ?effectUrl)
  ("🔎" AS ?zoom)  
  (CONCAT("#effect/", SUBSTR(STR(?effect), 38),
          "/projecttype/", SUBSTR(STR(target:), 38)) AS ?zoomUrl)

  ?example_pattern ?example_patternLabel
  (CONCAT("#pattern/", SUBSTR(STR(?example_pattern), 38)) AS ?example_patternUrl)  
 
WITH {
  SELECT 
    (COUNT(DISTINCT ?pattern) AS ?number_of_patterns)
    (SAMPLE(?pattern) AS ?example_pattern)
    ?effect
  WHERE {
    ?pattern dreamst:P2 dreams:Q263 ;
             dreamst:P16 / dreamst:P10* target: ;
             (dreamst:P33