Input:
A ----- 5000 4000 -3000 -2000
Output:
A FEEDBACK ----- -------- 9000 POSITIVE -5000 NEGATIVE
THEY HAVE GIVEN THE INPUT. I NEED TO WRITE A CODE TO BRING THE OUTPUT.
I think this query should do:
select sum(a) as a, 'POSITIVE' as feedback from t where a >= 0 union select sum(a) as a, 'NEGATIVE' as feedback from t where a < 0
I think this query should do: