New users within the past week (formatted usernames)

Hi, can anyone provide a data explorer query that provides a list of all new users within the past week and month? It’d be ideal if the format was so they were already @mentioned, making it easy to copy-paste it into a new post that welcomes these new members to the community.

New users within the past week (formatted usernames)

This should work ok for you -

    select concat ('@', username)
    from users
    where created_at >= CURRENT_DATE - INTERVAL '1 week'
    order by created_at desc 

Just change the 1 week to 1 month or what ever interval you want - you can then export as csv and should be able to copy and paste that into a post.

9 Likes

New users within a given time interval (formatted usernames)

I updated to include column header and parameter so you can easily change the interval:

-- [params]
-- string :interval = 1 week

select concat ('@', username) as "new users"
    from users
    where created_at >= CURRENT_DATE - INTERVAL :interval
    order by created_at desc
4 Likes