Skip to content

What discord author got the most distinct reactions to their messages?

Query Name

guild_author_distinct_reaction_count

SQL Query


select
    authors_t.author_name,
    authors_t.nickname, 
    reaction_count_t.reaction_count,
    guilds_t.guild_name,
    reaction_count_t.author_guild_id,
    guilds_t.id as guild_id
from
(
    select 
        author_guild_id,
        count(distinct(reaction_count)) as reaction_count
    from
        reactions_t
    where
        guild_id in (  (select id from guilds_t limit 1)  )
    group by author_guild_id
) as reaction_count_t
join authors_t on reaction_count_t.author_guild_id = authors_t.id
join guilds_t  on authors_t.guild_id = guilds_t.id
order by reaction_count desc;

Similar Queries