query-db8102c1d0cea3699fb7302a1c12e375

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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 distinct ?item ?itemLabel ?elo ?date 
WHERE {
  {
    SELECT ?item (MAX(?date) AS ?date) WHERE {
        {
  SELECT ?item ?stmt ?elo ?date WHERE {
     ?item p:P1087 ?stmt .
     ?stmt ps:P1087 ?elo .
     FILTER(?elo > 2700)
     optional {?stmt pq:P585 ?date }
  }
}.
    } GROUP BY ?item 
  }
   {
  SELECT ?item ?stmt ?elo ?date WHERE {
     ?item p:P1087 ?stmt .
     ?stmt ps:P1087 ?elo .
     FILTER(?elo > 2700)
     optional {?stmt pq:P585 ?date }
  }
}.   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?date"):::projected v1("?elo"):::projected v2("?item"):::projected v3("?stmt") c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?elo > '2700^^xsd:integer'"]] f0 --> v1 v2 --"p:P1087"--> v3 v3 --"p:statement/P1087"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P585".-> v5 end bind2[/"max(?date)"/] v5 --o bind2 bind2 --as--o v5 f3[["?elo > '2700^^xsd:integer'"]] f3 --> v1 v2 --"p:P1087"--> v3 v3 --"p:statement/P1087"--> v1 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P585".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end