SELECT JSON_OBJECT(\'countData\', JSON_ARRAYAGG(JSON_OBJECT( \'task\', nData.task, \'count\', nData.count))) as data FROM ( SELECT