WITH verified_users AS (
SELECT *
FROM users
JOIN user_sessions
ON user_sessions.user_id = users.id
WHERE
email = '[email protected]' AND
user_sessions.verified_at IS NOT NULL
ORDER BY users.created_at DESC
)
SELECT *
FROM verified_users
;