reteplayground
Aggregate

๐Ÿชž This repository, watching itself grow โ€” day by day

SELECT ?day (COUNT(*) AS ?events)
       (SUM(IF(?type = gh:PushEvent, 1, 0)) AS ?pushes)
       (SUM(IF(?type = gh:CreateEvent, 1, 0)) AS ?brancheโ€ฆ
       (SUM(IF(?type = gh:DeleteEvent, 1, 0)) AS ?brancheโ€ฆ
       (SUM(IF(?type = gh:PullRequestEvent, 1, 0)) AS ?prโ€ฆ
WHERE {
Run this query โ†’ no server ยท no download ยท no account
caviri.github.io/rete
Run this query in the playground โ†’ no server, no download โ€” the query runs in your browser.

The query

PREFIX gh: <https://w3id.org/rete/gharchive#> PREFIX prov: <http://www.w3.org/ns/prov#> SELECT ?day (COUNT(*) AS ?events) (SUM(IF(?type = gh:PushEvent, 1, 0)) AS ?pushes) (SUM(IF(?type = gh:CreateEvent, 1, 0)) AS ?branchesCreated) (SUM(IF(?type = gh:DeleteEvent, 1, 0)) AS ?branchesDeleted) (SUM(IF(?type = gh:PullRequestEvent, 1, 0)) AS ?prEvents) WHERE { ?ev gh:repo <https://github.com/caviri/rete> ; a ?type ; prov:atTime ?t . BIND(day(?t) AS ?day) } GROUP BY ?day ORDER BY ?day

rete playground ยท documentation ยท github.com/caviri/rete