query-77f15573d98acf4337d3084db1b2ce7e

rq turtle/ttl

Submissions

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT 
  ?max_submissions
  ?track ?trackLabel
  ?event_series ?event_seriesLabel
  (CONCAT("#scientificeventseries/", SUBSTR(STR(?event_series), 32)) AS ?event_seriesUrl)
WHERE {
   {
  SELECT 
    (MAX(?submissions) AS ?max_submissions)
    ?event_series
    ?track
  WHERE {
    ?event_series wdt:P31 / wdt:P279* wd:Q125391566 .
    ?event wdt:P179 ?event_series ;
           p:P12655 ?submissions_statement .
    ?submissions_statement ps:P12655 ?submissions .
    OPTIONAL { ?submissions_statement pq:P518 ?track_ . }
    BIND(COALESCE(?track_, "-") AS ?track)
    BIND(STR(YEAR(?datetime)) AS ?year)
  }
  GROUP BY ?event_series ?track
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?max_submissions)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?event") v2("?event_series"):::projected v9("?event_seriesUrl") v9("?max_submissions"):::projected v5("?submissions") v4("?submissions_statement") v7("?track"):::projected v6("?track_") v8("?year") a1((" ")) c3(["wd:Q125391566"]):::iri c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v3 --"p:direct/P179"--> v2 v3 --"p:P12655"--> v4 v4 --"p:statement/P12655"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P518".-> v6 end bind0[/"?track_'-'"/] v6 --o bind0 bind0 --as--o v7 bind1[/"str(year-from-dateTime(?datetime))"/] null --o bind1 bind1 --as--o v8 bind3[/"max(?submissions)"/] v5 --o bind3 bind3 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind4[/"concat('#scientificeventseries/',substring(str(?event_series),'32^^xsd:integer'))"/] v2 --o bind4 bind4 --as--o v9