Is there any way to make first row be different then the rest, so it would show total sum of the appropriate columns?
For example:
fruits|a|b|c
SELECT 'total' AS fruits, sum(a), sum(b), sum(c) FROM basket UNION ALL SELECT fruits, sum(a), sum(b), sum(c) FROM basket GROUP BY fruits