I think you need to calculate the number of tasks for the "number of tasks" for a specific date. As for your counting and summing, I added them too, just save the single “group” from net_date.
select
net_date,
count( distinct jobs ) as NumberOfJobs,
sum( jobs ) as SumOfJobs,
max( jobs ) as MaxJobs
from
net_report
group by
net_date
If you are looking for a date with unique MOST jobs, add the following to the above query
order by 2 DESC limit 1
An order of 2 refers to the ordinal column "NumberOfJobs", Limit 1, to return only the first record of the final "ordered" result set.
source
share