SELECT id, email, tier, 
       CASE WHEN api_key IS NOT NULL THEN 'YES' ELSE 'NO' END as has_api_key
FROM users 
WHERE is_active = true 
ORDER BY id;
