What discord author has the highest spike in activity in single day from a specific discord guild?
Query Name
- guild_author_most_messages_single_day
Query Description?
- What constitutes a spike?
- Total number of messages in a single day
SQL Query
select
authors_t.author_name,
authors_t.nickname,
msg_date_agg_t.day_msg_count,
msg_date_agg_t.author_guild_id,
guilds_t.guild_name,
guilds_t.id as guild_id
from
(
select
count(msg_date_t.msg_date) as day_msg_count,
msg_date_t.msg_date,
msg_date_t.author_guild_id
from
(
SELECT
TO_CHAR(msg_timestamp, 'YYYY-MM-DD') as msg_date,
author_guild_id
from
messages_t
where guild_id in ( (select id from guilds_t limit 1) )
) as msg_date_t
group by msg_date_t.msg_date, msg_date_t.author_guild_id
) as msg_date_agg_t
join authors_t on msg_date_agg_t.author_guild_id = authors_t.id
join guilds_t on authors_t.guild_id = guilds_t.id
order by day_msg_count desc;
Similar Queries
Backlinks