I am trying to group by Names and get the Avgerage Days greater than 0 for each group.
Table Name: Test
Field1: Names
Field2: Days
Here is what I have so far and the problem I have is that the average is for all the records and not grouping by name. The second issue I have is that the Average is including negative numbers and not just the numbers greater than zero.
Code:SELECT test.Names, Avg(Days)>0 AS AvgDays FROM test GROUP BY test.Names;