query-e376c64a8f262d834265b32e6f90717f

rq turtle/ttl

title:current ranking in Top500 SELECT distinct ?rank ?item ?itemLabel ?countryLabel ?perf ?procs ?heat ?top500 ?osLabel ?time ?busLabel WHERE { ?item wdt:P31/wdt:P279* wd:Q121117. OPTIONAL {?item wdt:P17|wdt:P495 ?country.} OPTIONAL {?item wdt:P176 ?creator.} OPTIONAL {?item p:P7256 [ps:P7256 ?perf; pq:P585 []].}

OPTIONAL {?item wdt:P7256 ?perf.}

OPTIONAL {?item wdt:P2791 ?heat.} OPTIONAL {?item wdt:P7307 ?top500.} OPTIONAL {?item wdt:P306 ?os.} OPTIONAL {?item wdt:P1141 ?procs.} OPTIONAL {?item wdt:P571|wdt:P729 ?creat.} OPTIONAL {?item wdt:P8107 ?bus.}

?item wdt:P1352 ?rank. # use only for the recent ranking

?item p:P1352 [ps:P1352 ?rank; pq:P447 wd:Q633765]. OPTIONAL { {?item p:P1352 [ps:P1352 ?rank; pq:P585 ?time].} UNION {?item p:P1352 [ps:P1352 ?rank; pq:P580 ?time].} UNION {?item p:P1352 [ps:P1352 ?rank; pq:P582 ?time].} } BIND (YEAR(?time) as ?year). BIND (MONTH(?time) as ?month). FILTER (?year = 2023). FILTER (?month = 6). SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?rank

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#>
#title:current ranking in Top500
SELECT distinct ?rank ?item ?itemLabel ?countryLabel ?perf ?procs ?heat ?top500 ?osLabel ?time ?busLabel
WHERE 
{
  ?item wdt:P31/wdt:P279* wd:Q121117.
  OPTIONAL {?item wdt:P17|wdt:P495 ?country.}
  OPTIONAL {?item wdt:P176 ?creator.}
  OPTIONAL {?item p:P7256 [ps:P7256 ?perf; pq:P585 []].}
#  OPTIONAL {?item wdt:P7256 ?perf.}
  OPTIONAL {?item wdt:P2791 ?heat.}
  OPTIONAL {?item wdt:P7307 ?top500.}
  OPTIONAL {?item wdt:P306 ?os.}
  OPTIONAL {?item wdt:P1141 ?procs.}
  OPTIONAL {?item wdt:P571|wdt:P729 ?creat.}
  OPTIONAL {?item wdt:P8107 ?bus.}
#  ?item wdt:P1352 ?rank.  # use only for the recent ranking
  ?item p:P1352 [ps:P1352 ?rank; pq:P447 wd:Q633765].
  OPTIONAL { {?item p:P1352 [ps:P1352 ?rank; pq:P585 ?time].} 
      UNION {?item p:P1352 [ps:P1352 ?rank; pq:P580 ?time].} 
      UNION {?item p:P1352 [ps:P1352 ?rank; pq:P582 ?time].} }
  BIND (YEAR(?time) as ?year).
  BIND (MONTH(?time) as ?month).
  FILTER (?year = 2023).
  FILTER (?month = 6). 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?rank

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v13("?bus") v5("?country") v12("?creat") v6("?creator") v8("?heat"):::projected v4("?item"):::projected v15("?month") v10("?os") v7("?perf"):::projected v11("?procs"):::projected v1("?rank"):::projected v14("?time"):::projected v9("?top500"):::projected v15("?year") a3((" ")) a1((" ")) a2((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) c26(["bd:serviceParam"]):::iri c5(["wd:Q121117"]):::iri c21(["wd:Q633765"]):::iri c28(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?month = '6^^xsd:integer'"]] f0 --> v15 f1[["?year = '2023^^xsd:integer'"]] f1 --> v15 v4 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 -."p:direct/P495".-> v5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P17"--> v5 end union0r <== or ==> union0l end end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P176".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; a2 -."p:statement/P7256".-> v7 a2 --"p:qualifier/P585"--> a3 v4 --"p:P7256"--> a2 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P2791".-> v8 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P7307".-> v9 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P306".-> v10 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P1141".-> v11 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v4 -."p:direct/P729".-> v12 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P571"--> v12 end union1r <== or ==> union1l end end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P8107".-> v13 end a4 --"p:statement/P1352"--> v1 a4 --"p:qualifier/P447"--> c21 v4 --"p:P1352"--> a4 subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; 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; a7 -."p:statement/P1352".-> v1 a7 --"p:qualifier/P582"--> v14 v4 --"p:P1352"--> a7 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; a6 --"p:statement/P1352"--> v1 a6 --"p:qualifier/P580"--> v14 v4 --"p:P1352"--> a6 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; a5 --"p:statement/P1352"--> v1 a5 --"p:qualifier/P585"--> v14 v4 --"p:P1352"--> a5 end union2r <== or ==> union2l end end bind2[/"year-from-dateTime(?time)"/] v14 --o bind2 bind2 --as--o v15 bind3[/"month-from-dateTime(?time)"/] v14 --o bind3 bind3 --as--o v15 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c26 --"wikibase:language"--> c28 end