Dreams:pattern-index: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
SELECT | SELECT | ||
? | ?pattern ?patternLabel | ||
(CONCAT("#pattern/", SUBSTR(STR(?pattern), 38) AS ?patternUrl) | |||
?subject ?subjectLabel | ?subject ?subjectLabel | ||
?object ?objectLabel | ?object ?objectLabel | ||
Line 15: | Line 17: | ||
?report ?reportLabel | ?report ?reportLabel | ||
WHERE { | WHERE { | ||
? | ?pattern dreamst:P2 dreams:Q263 ; | ||
dreamst:P33 ?subject ; | |||
dreamst:P34 ?object ; | |||
dreamst:P18 ?quote ; | |||
dreamst:P20 ?report . | |||
OPTIONAL { ? | OPTIONAL { ?pattern dreamst:P19 ?project_phase . } | ||
OPTIONAL { ? | OPTIONAL { ?pattern dreamst:P16 ?project_type . } | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } | ||
} | } |
Revision as of 14:28, 11 August 2022
Patterns
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 ?pattern ?patternLabel (CONCAT("#pattern/", SUBSTR(STR(?pattern), 38) AS ?patternUrl) ?subject ?subjectLabel ?object ?objectLabel ?quote ?project_phase ?project_phaseLabel ?project_type ?project_typeLabel ?report ?reportLabel WHERE { ?pattern dreamst:P2 dreams:Q263 ; dreamst:P33 ?subject ; dreamst:P34 ?object ; dreamst:P18 ?quote ; dreamst:P20 ?report . OPTIONAL { ?pattern dreamst:P19 ?project_phase . } OPTIONAL { ?pattern dreamst:P16 ?project_type . } SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } }
Reports
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 ?report ?reportLabel (CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl) WITH { SELECT (COUNT(?pattern) AS ?number_of_patterns) ?report WHERE { ?pattern dreamst:P2 dreams:Q263 ; dreamst:P20 ?report . } GROUP BY ?report } AS %result WHERE { INCLUDE %result SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". } } ORDER BY DESC(?number_of_patterns)