aboutsummaryrefslogtreecommitdiffstats
path: root/webstats/queries.sql
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2025-02-10 02:08:51 +0100
committerOscar Najera <hi@oscarnajera.com>2025-02-10 02:08:51 +0100
commit0967597ff39c925bd746223b994922e632a0c98e (patch)
treeb732389062227b84aedce0d5044cd4d68c9ceb1d /webstats/queries.sql
parent7b90ec0b14a0114f055a26e2f29f92a3f771c87e (diff)
downloadscratch-0967597ff39c925bd746223b994922e632a0c98e.tar.gz
scratch-0967597ff39c925bd746223b994922e632a0c98e.tar.bz2
scratch-0967597ff39c925bd746223b994922e632a0c98e.zip
stats for separate domains
Diffstat (limited to 'webstats/queries.sql')
-rw-r--r--webstats/queries.sql12
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