Tentei assim, substituindo o campo data para o valor correto da coluna.
SELECT s.setor,
SUM(IF(`dtsaida` >= DATE(NOW()) AND `dtsaida` <= DATE_ADD(DATE(NOW()), INTERVAL 5 DAY),1,0)) AS `0 - 5 dias`
SUM(IF(`dtsaida` >= DATE_ADD(DATE(NOW()), INTERVAL 6 DAY AND `dtsaida` <= DATE_ADD(DATE(NOW()), INTERVAL 10 DAY),1,0)) AS `6 - 10 dias`,
SUM(IF(`dtsaida` > DATE_ADD(DATE(NOW()), INTERVAL 10 DAY),1,0)) AS `+10 dias`
FROM producao p
JOIN producao_setor s ON p.setor = s.codproducao_setor
WHERE p.status = 'Aberta';
GROUP BY s.setor
Porém, deu este erro.
Mensagem do MySQL:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(IF(`dtsaida` >= DATE_ADD(DATE(NOW()), INTERVAL 6 DAY AND `dtsaida` <= DATE_A' at line 3