Hi,
I’m trying to use optional parameter within a native query below, it was supposed to get a result even if filter is not selected but instead it show no result.
Another problem is that it show no result if two options is selected while it works with only one.
SELECT `avaliacao`.`answer` AS `Avaliação`, count(*) / (SELECT count(*) from avaliacao) AS Percentual
FROM `avaliacao`
LEFT JOIN `solicitacoes` ON `avaliacao`.`ID da Solicitação` = `solicitacoes`.`ID`
[[ WHERE `solicitacoes`.`Grupo` IN ({{grupo}}) ]]
GROUP BY `avaliacao`.`answer`
ORDER BY Percentual Desc