When grouping by group path we have to apply the filter to the group by using HAVING and not using WHERE