query-b1b9d2524177baa2e3225b939522b7f1

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select ?item ?itemLabel ?FAsum ?GAsum ?sum where 
{
   {
  SELECT ?item (SUM(?weight) as ?sum)  (sum(?FA) as ?FAsum) (sum(?GA) as ?GAsum) {
    ?sitelink schema:about ?item; wikibase:badge ?badge .
    VALUES (?badge ?weight ?FA ?GA) { ( wd:Q17437796 2 1 0) ( wd:Q17437798 1 0 1) } 
  } GROUP BY ?item
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC (?sum) limit 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?FA") v8("?FAsum"):::projected v7("?GA") v9("?GAsum"):::projected v5("?badge") v3("?item"):::projected v2("?sitelink") v8("?sum"):::projected v5("?weight") c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"schema:about"--> v3 v2 --"wikibase:badge"--> v5 bind0[/VALUES ?FA ?GA ?badge ?weight/] bind0-->v5 bind0-->v5 bind0-->v6 bind0-->v7 bind00(["wd:Q17437796"]) bind00 --> bind0 bind01(["2^^xsd:integer"]) bind01 --> bind0 bind02(["1^^xsd:integer"]) bind02 --> bind0 bind03(["0^^xsd:integer"]) bind03 --> bind0 bind04(["wd:Q17437798"]) bind04 --> bind0 bind05(["1^^xsd:integer"]) bind05 --> bind0 bind06(["0^^xsd:integer"]) bind06 --> bind0 bind07(["1^^xsd:integer"]) bind07 --> bind0 bind4[/"sum(?weight)"/] v5 --o bind4 bind4 --as--o v8 bind5[/"sum(?FA)"/] v6 --o bind5 bind5 --as--o v8 bind6[/"sum(?GA)"/] v7 --o bind6 bind6 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end