Dreams:projecttype: Difference between revisions

→‎Effects: Moved to projecttype-effect-index
(→‎Project type data: projecttype-effect-index link)
(→‎Effects: Moved to projecttype-effect-index)
Line 54: Line 54:
}
}
ORDER BY ?order}}
ORDER BY ?order}}
== Effects ==
{{SPARQL | query=
PREFIX target: <https://dreams.wikibase.cloud/entity/Q264>
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(?pattern) AS ?number_of_patterns)
    (SAMPLE(?pattern) AS ?example_pattern)
    ?effect
  WHERE {
    ?pattern dreamst:P2 dreams:Q263 ;
            dreamst:P16 / dreamst:P10* target: ;
            (dreamst:P33 | dreamst:P34) / dreamst:P10* ?effect .
  }
  GROUP BY ?effect
} AS %result
WHERE {
  INCLUDE %result
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
ORDER BY DESC(?number_of_patterns)
}}


== Patterns ==
== Patterns ==