What discord author was mentioned the most?
Problem
We don't know who is mentioning who given the current schema and indexing process. Might need to upgrade it.
Query Name
guild_author_mention_count
SQL Query
select
authors_t.author_name,
authors_t.nickname,
mention_count_t.mention_count,
guilds_t.guild_name,
mention_count_t.author_guild_id,
guilds_t.id as guild_id
from
(
select
count(*) as mention_count,
author_guild_id
from
mentions_t
group by author_guild_id
) as mention_count_t
join authors_t on mention_count_t.author_guild_id = authors_t.id
join guilds_t on authors_t.guild_id = guilds_t.id
order by mention_count_t.mention_count desc;