Query being used at this time:
update metrics.time_created
set cumu_count = (
select count(*)
from perf_stats.time
where date(insert_datetime)='2015-12-18'
)
where id=max(id);
I get an "invalid use of group function" here -- how can I rewrite this to keep the same logic? I have to update the most recent row in the metrics.time_created table.