select case when amount between 0 and 1 then '0~1' when amount between 1 and 2 then '1~2' else '2~' end as 'amount_range' ,count(distinct customer_id) as customer_count ,sum(amount) as total_amount from payment group by amount_range;