• First, it is a bad idea to hardcode your dates into your query. I will assume for now that it is just for testing purposes

    Second using GROUP BY with DISTINCT is unnecessary, use one or the other. Generally I use DISTINCT when I do not need to aggregate (SUM, AVG, etc.) anything, and GROUP BY if I do need to aggregate some values. The error you are getting is because 'People_tbl.ScairHoursOnly' is not in your GROUP BY section. Either remove your GROUP BY section entirely or add 'People_tbl.ScairHoursOnly' to your GROUP BY section and it should work.