SQL Aggregate of a sub Aggregate
I'm trying to create a SQL function where by an outter select aggregates an inner select that also aggregates.
I have data that is recorded by the hour for each day. The first part I can do, where I can get the daily average for each field needed from all the hours' records.
The tricky part is I want to be able to take those daily results and apply them to another select that would get the average or min or max value. I tried putting a sub select in the 'from' portion, but Filemaker doesn't seem to like that.