Having trouble some using select case for the below logic.with sample as ( select 6 as Items,0 as score union all select 2 as Items,30 as score union all select 10 as Items,50 as score union all select 12 as Items,75 as score ) select * from sample;
i want to segregate and sum the value as three categoryscore >= 0 and <40score >= 40 and <70score >=70
[on the sample data i provided, two items meets my first condition so sum the value and displayed as 6]Expected result: With Result as ( select 8 as poor, 10 as average,12 as Good) select * from result
Any sample query please. bit confused about using select case for this category