Skip to content

Commit

Permalink
Update queries
Browse files Browse the repository at this point in the history
  • Loading branch information
rxdn committed Apr 13, 2024
1 parent 6240abe commit 688a3d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sql/last_n_tickets_per_day_guild.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SELECT date, countMerge(count) AS count
SELECT date, uniqExactMerge(count) AS count
FROM analytics.tickets_per_day
WHERE guild_id = ?
GROUP BY date
ORDER BY date desc
WITH FILL STEP toIntervalDay(-1)
WITH FILL FROM today() STEP toIntervalDay(-1)
LIMIT ?;
5 changes: 2 additions & 3 deletions sql/total_open_ticket_count.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
SELECT countMerge(count) AS total_count
FROM analytics.total_open_ticket_count
WHERE guild_id = ?;
SELECT count AS total_count
FROM analytics.total_open_ticket_count(guild_id = ?);
2 changes: 1 addition & 1 deletion sql/total_ticket_count.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SELECT countMerge(count) AS total_count
SELECT uniqExactMerge(count) AS total_count
FROM analytics.total_ticket_count
WHERE guild_id = ?;

0 comments on commit 688a3d2

Please sign in to comment.