SELECT 
    COUNT(*) as total_users,
    COUNT(CASE WHEN status = 'active' THEN 1 END) as active_users,
    COUNT(CASE WHEN status = 'pending' THEN 1 END) as pending_users,
    MIN(created_at) as oldest_user,
    MAX(created_at) as newest_user
FROM users;

SELECT email, status, created_at 
FROM users 
ORDER BY created_at DESC 
LIMIT 10;
