query-b3e5666dc2a5a16481aab1fa2325cbd1

rq turtle/ttl

Related roles

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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#>
PREFIX target1: <http://www.wikidata.org/entity/Q6053150>
PREFIX target2: <http://www.wikidata.org/entity/Q125207931>

SELECT
  ?persons

  ?role ?roleLabel

  ?other_event_series ?other_event_seriesLabel
  (CONCAT("#scientificeventseries/", SUBSTR(STR(?other_event_series), 32)) AS ?other_event_seriesUrl)

  ?example_person ?example_personLabel
  (CONCAT("#author/", SUBSTR(STR(?example_person), 32)) AS ?example_personUrl)


WHERE {
   {
  SELECT 
    (COUNT(DISTINCT ?person) AS ?persons)
    ?other_event_series
    ?role
    (SAMPLE(?person) AS ?example_person)
  WHERE {
    ?event wdt:P179 target1: ;
           p:P664 ?organizer_statement .
    ?organizer_statement ps:P664 ?person ;
                          pq:P3831 target2: .

    [] wdt:P179 ?other_event_series ;
       p:P664 ?other_organizer_statement .
    ?other_organizer_statement ps:P664 ?person ;
                               pq:P3831 ?role .
    FILTER (target2: != ?role)
  }
  GROUP BY ?other_event_series ?role
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?persons)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?event") v8("?example_person"):::projected v10("?example_personUrl") v4("?organizer_statement") v6("?other_event_series"):::projected v9("?other_event_seriesUrl") v7("?other_organizer_statement") v5("?person") v8("?persons"):::projected v2("?role"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c1([http://www.wikidata.org/entity/Q125207931]):::iri c3([http://www.wikidata.org/entity/Q6053150]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["http://www.wikidata.org/entity/Q125207931 != ?role"]] f0 --> v2 v3 --"p:direct/P179"--> c3 v3 --"p:P664"--> v4 v4 --"p:statement/P664"--> v5 v4 --"p:qualifier/P3831"--> c1 a1 --"p:direct/P179"--> v6 a1 --"p:P664"--> v7 v7 --"p:statement/P664"--> v5 v7 --"p:qualifier/P3831"--> v2 bind3[/"count(?person)"/] v5 --o bind3 bind3 --as--o v8 bind4[/"sample(?person)"/] v5 --o bind4 bind4 --as--o v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind5[/"concat('#scientificeventseries/',substring(str(?other_event_series),'32^^xsd:integer'))"/] v6 --o bind5 bind5 --as--o v9 bind6[/"concat('#author/',substring(str(?example_person),'32^^xsd:integer'))"/] v8 --o bind6 bind6 --as--o v10