query-ada156afd29628dd6783b9665ea1ad3d

rq turtle/ttl

Colocated event series

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q6053150>

SELECT
  ?colocated_events
  ?colocated_event_series ?colocated_event_seriesLabel
  (CONCAT("#scientificeventseries/", SUBSTR(STR(?colocated_event_series), 32)) AS ?colocated_event_seriesUrl)
  ?colocated_event_seriesDescription
WHERE {
   {
  SELECT 
    (COUNT(?colocated_event) AS ?colocated_events)
    ?colocated_event_series
  WHERE {
    ?event wdt:P179 target: ;
           wdt:P11633| ^wdt:P11633 ?colocated_event .
    ?colocated_event wdt:P179 ?colocated_event_series .
  }
  GROUP BY ?colocated_event_series
} 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
ORDER BY DESC(?colocated_events)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?colocated_event") v4("?colocated_event_series"):::projected v5("?colocated_event_seriesUrl") v5("?colocated_events"):::projected v2("?event") c5(["bd:serviceParam"]):::iri c2([http://www.wikidata.org/entity/Q6053150]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P179"--> c2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P11633"--> v2 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P11633"--> v3 end union0r <== or ==> union0l end v3 --"wdt:P179"--> v4 bind1[/"count(?colocated_event)"/] v3 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end bind2[/"concat('#scientificeventseries/',substring(str(?colocated_event_series),'32^^xsd:integer'))"/] v4 --o bind2 bind2 --as--o v5