Yes, the group_userscreated_at field can be used for that. It will be set to the date when the user was added to the group. You could try running a query like the one below at periodic intervals to find all users who were added to the group during the interval. The query’s granted_at field expects a date in the form yyyy-mm-dd. For example 2020-09-15
--[params]
-- string :group_name = trust_level_3
-- date :granted_at
SELECT
user_id,
gu.created_at::date
FROM group_users gu
JOIN groups g
ON g.id = gu.group_id
WHERE gu.created_at::date >= :granted_at
AND g.name = :group_name
If you need more user details, it would be possible to update the query to join the users table, or the user_emails table.
Hi @Randy_Hulett , is this query available somewhere? I am looking to monitor users that achieve TLs 2 and 3 but don’t seem to find the query for that.