Explain: D2 2 1 0 (here D2 means a country, total positive value = 2, total negative value=1, tital unchanged vale = 0) What will be the query? PLEASE HELP
SELECT country, SUM(IF(temp>0,1,0)) AS positive, SUM(IF(temp<0,1,0)) AS negative, SUM(IF(temp=0,1,0)) AS unchanged FROM weather GROUP BY country ORDER BY country ASC; Code (markup):