Order by certain enum values first
You can use a CASE expression:
order by case &quot;type&quot;
            when 'article_invitation' then 1
            when 'new_article' then 2
            when 'article_read' then 3
            when 'friend_request' then 4
         end, 
         updated_at desc