suppose here we have a table name Student which has a coulmn grade.
age
31
-22
22
-25
28
35
-23
Loading
suppose here we have a table name Student which has a coulmn grade.
age
31
-22
22
-25
28
35
-23
select sum(case when x>0 then x else 0 end)sum_pos,sum(case when x<0 then x else 0 end)sum_neg from Test;