diff options
Diffstat (limited to 'webstats/queries.sql')
-rw-r--r-- | webstats/queries.sql | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/webstats/queries.sql b/webstats/queries.sql index 5e16da0..5a8a0ae 100644 --- a/webstats/queries.sql +++ b/webstats/queries.sql @@ -30,3 +30,15 @@ FROM STATS GROUP BY 1; + +-- name: activity-places +-- timeseries of loaded places +SELECT + (timestamp / 600) * 600 AS time, + count(page) FILTER (WHERE page LIKE 'http://localhost:4252%') AS stats, + count(page) FILTER (WHERE page LIKE 'http://localhost/%') AS stats_proxy, + count(page) FILTER (WHERE page LIKE 'http://localhost:1313%') AS blog +FROM + STATS +GROUP BY + 1 |