Debería ser una consulta similar:
SELECT
cat,
SUM(IF(item = 0,data,0)) AS data0,
SUM(IF(item = 1,data,0)) AS data1
FROM table GROUP BY cat;
Debería ser una consulta similar:
SELECT
cat,
SUM(IF(item = 0,data,0)) AS data0,
SUM(IF(item = 1,data,0)) AS data1
FROM table GROUP BY cat;