suppose here we have a table name Student which has a coulmn grade.age31-2222-252835-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;