Skip to content

How many users have posted more than 100 messages in a particular discord guild?

SQL Query

guild_author_message_min_100

SQL Query


select
    guild_name,
    author_name,
    nickname,
    msg_count,
    guild_id,
    authors_t.author_id,
    authors_t.id
from
(
    select
        author_guild_id,
        count(*) as msg_count
    from
        messages_t
    where
        guild_id in (  (select id from guilds_t limit 1)  )
        and messages_t.is_bot = 'F'
    group by author_guild_id
) as author_message_count_t
join authors_t on author_message_count_t.author_guild_id = authors_t.id
join guilds_t on authors_t.guild_id = guilds_t.id
where msg_count > 100
order by msg_count desc;