query-94bf616380c8b41712e3bd797418b73f

rq turtle/ttl

Related scientific event series based on people

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/Q17012957>

SELECT
  ?score

  ?event_series ?event_seriesLabel
  (CONCAT("#scientificeventseries/", SUBSTR(STR(?event_series), 32)) AS ?event_seriesUrl)
  ?event_seriesDescription

  ?example_person ?example_personLabel
  (CONCAT("#author/", SUBSTR(STR(?example_person), 32)) AS ?example_personUrl)
WHERE {
  { 
    SELECT
      (COUNT(DISTINCT ?person) AS ?score) ?event_series
      (SAMPLE(?person) AS ?example_person)
    WHERE {
      ?person (^wdt:P823 | ^wdt:P664 | wdt:P1344 | ^wdt:P710 | (^wdt:P98 / wdt:P4745) | (^wdt:P50 / wdt:P1433 / wdt:P4745 ) | ^wdt:P5804 ) / wdt:P179 target: ;
              (^wdt:P823 | ^wdt:P664 | wdt:P1344 | ^wdt:P710 | (^wdt:P98 / wdt:P4745) | (^wdt:P50 / wdt:P1433 / wdt:P4745 ) | ^wdt:P5804 ) / wdt:P179 ?event_series .
      FILTER (?event_series != target:)
    }
    GROUP BY ?event_series
    ORDER BY DESC(?score)
    LIMIT 200
  } 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?score)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?event_series"):::projected v5("?event_seriesUrl") v4("?example_person"):::projected v6("?example_personUrl") v3("?person") v4("?score"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) a8((" ")) c13(["bd:serviceParam"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal c1([http://www.wikidata.org/entity/Q17012957]):::iri f0[["?event_series != http://www.wikidata.org/entity/Q17012957"]] f0 --> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P5804"--> v3 end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; a3 --"wdt:P50"--> v3 a3 --"wdt:P1433"--> a4 a4 --"wdt:P4745"--> a1 end union5r <== or ==> union5l end end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; a2 --"wdt:P98"--> v3 a2 --"wdt:P4745"--> a1 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P710"--> v3 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P1344"--> a1 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P664"--> v3 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P823"--> v3 end union0r <== or ==> union0l end a1 --"wdt:P179"--> c1 subgraph union6[" Union "] subgraph union6l[" "] style union6l fill:#abf,stroke-dasharray: 3 3; subgraph union7[" Union "] subgraph union7l[" "] style union7l fill:#abf,stroke-dasharray: 3 3; subgraph union8[" Union "] subgraph union8l[" "] style union8l fill:#abf,stroke-dasharray: 3 3; subgraph union9[" Union "] subgraph union9l[" "] style union9l fill:#abf,stroke-dasharray: 3 3; subgraph union10[" Union "] subgraph union10l[" "] style union10l fill:#abf,stroke-dasharray: 3 3; subgraph union11[" Union "] subgraph union11l[" "] style union11l fill:#abf,stroke-dasharray: 3 3; a5 --"wdt:P5804"--> v3 end subgraph union11r[" "] style union11r fill:#abf,stroke-dasharray: 3 3; a7 --"wdt:P50"--> v3 a7 --"wdt:P1433"--> a8 a8 --"wdt:P4745"--> a5 end union11r <== or ==> union11l end end subgraph union10r[" "] style union10r fill:#abf,stroke-dasharray: 3 3; a6 --"wdt:P98"--> v3 a6 --"wdt:P4745"--> a5 end union10r <== or ==> union10l end end subgraph union9r[" "] style union9r fill:#abf,stroke-dasharray: 3 3; a5 --"wdt:P710"--> v3 end union9r <== or ==> union9l end end subgraph union8r[" "] style union8r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P1344"--> a5 end union8r <== or ==> union8l end end subgraph union7r[" "] style union7r fill:#abf,stroke-dasharray: 3 3; a5 --"wdt:P664"--> v3 end union7r <== or ==> union7l end end subgraph union6r[" "] style union6r fill:#abf,stroke-dasharray: 3 3; a5 --"wdt:P823"--> v3 end union6r <== or ==> union6l end a5 --"wdt:P179"--> v2 bind3[/"count(?person)"/] v3 --o bind3 bind3 --as--o v4 bind4[/"sample(?person)"/] v3 --o bind4 bind4 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end bind5[/"concat('#scientificeventseries/',substring(str(?event_series),'32^^xsd:integer'))"/] v2 --o bind5 bind5 --as--o v5 bind6[/"concat('#author/',substring(str(?example_person),'32^^xsd:integer'))"/] v4 --o bind6 bind6 --as--o v6