diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 0e5e53f..0000000 --- a/TODO.md +++ /dev/null @@ -1,8 +0,0 @@ -- [ ] Add a "running campaigns" widget on the dashboard -- [ ] Add more analytics and stats -- [ ] Add bounce tracking -- [ ] Pause campaigns on % errors in addition to an absolute numbers -- [ ] Support DB migrations for easy upgrades -- [ ] Add materialized views for analytics and stats (and more?) -- [ ] Add user management and permissions -- [ ] Add tests diff --git a/stats.sql b/stats.sql deleted file mode 100644 index 1cca357..0000000 --- a/stats.sql +++ /dev/null @@ -1,25 +0,0 @@ --- WITH l AS ( --- SELECT type, COUNT(id) AS count FROM lists GROUP BY type --- ), --- subs AS ( --- SELECT status, COUNT(id) AS count FROM subscribers GROUP by status --- ), --- subscrips AS ( --- SELECT status, COUNT(subscriber_id) AS count FROM subscriber_lists GROUP by status --- ), --- orphans AS ( --- SELECT COUNT(id) AS count FROM subscribers LEFT JOIN subscriber_lists ON (subscribers.id = subscriber_lists.subscriber_id) --- WHERE subscriber_lists.subscriber_id IS NULL --- ), --- camps AS ( --- SELECT status, COUNT(id) AS count FROM campaigns GROUP by status --- ) --- SELECT t3.*, t5.* FROM l t1 --- LEFT JOIN LATERAL ( --- SELECT JSON_AGG(t2.*) AS lists --- FROM (SELECT * FROM l) t2 --- ) t3 ON TRUE --- LEFT JOIN LATERAL ( --- SELECT JSON_AGG(t4.*) AS subs --- FROM (SELECT * FROM subs) t4 --- ) t5 ON TRUE; \ No newline at end of file