query-7b1db67f3afae947dda4ce7cc8eccf6c

rq turtle/ttl

TODO

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?personLabel ?followers ?channelLabel WHERE {
  ?person p:P8687 ?stat . 
  ?stat ps:P8687 ?followers .
  ?stat ?predicate ?value . 
  ?property wikibase:qualifier ?predicate .
  ?property wdt:P1629 ?channel .
  filter not exists {wd:P585 wikibase:qualifier ?predicate.}
  {
    SELECT DISTINCT ?person (max(?followers_) as ?followers) WHERE
    {
    ?person wdt:P106 wd:Q937857 .
    ?person wdt:P8687 ?followers_ .
    } GROUP BY ?person
  } 
  SERVICE wikibase:label {bd:serviceParam wikibase:language "en" .}
} ORDER BY DESC (?followers)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?channel") v9("?followers"):::projected v8("?followers_") v3("?person") v2("?predicate") v6("?property") v4("?stat") v5("?value") c1(["wd:P585"]):::iri c10(["bd:serviceParam"]):::iri c7(["wd:Q937857"]):::iri c12(["en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0c1 --"wikibase:qualifier"--> e0v1 e0v1("?predicate"):::projected e0c1(["wd:P585"]):::iri end f0--EXISTS--> f0e0 f0 --> c1 f0 --> c2 f0 --> v2 c1 --"wikibase:qualifier"--> v2 v3 --"p:P8687"--> v4 v4 --"p:statement/P8687"--> v9 v4 -->v2--> v5 v6 --"wikibase:qualifier"--> v2 v6 --"p:direct/P1629"--> v7 v3 --"p:direct/P106"--> c7 v3 --"p:direct/P8687"--> v8 bind2[/"max(?followers_)"/] v8 --o bind2 bind2 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end