Group inboxes and archives are visible even when empty

Does this data explorer query return any topics?

-- [params]
-- group_id :inboxgroup

SELECT tg.topic_id, t.id AS topic_exists, t.deleted_at
FROM topic_allowed_groups tg
LEFT JOIN topics t ON t.id = tg.topic_id
WHERE tg.group_id = :inboxgroup
  AND (
    t.deleted_at IS NULL
    OR t.id IS NULL
  )

1 Like