Segmenting Users: CASE WHEN and Subqueries