Hello,
I have a question about a query, here's the data:
Dataloggerkey Timestep
977 6
977 8
977 10
977 82
888 10
888 4
888 12
In the query I'd like to have:
Select dataloggerkey, SUM(Timestep)/(60*24) */to convert mins to days*/
From MDT
Where SUM(Timestep)/(60*24)<8 */to sort out only those dataloggerkey data where the total timestep is less than one week*/
Group by dataloggerkey;
Problem is I can't have an aggregate function in the where clause. Can you help me with a workaround? Or is the easiest way to tackle this to have this same query make a new table with a field that is SUM(Timestep)/(60*24) as Days and then sort that table by Days<8?
Thanks in advance.
I have a question about a query, here's the data:
Dataloggerkey Timestep
977 6
977 8
977 10
977 82
888 10
888 4
888 12
In the query I'd like to have:
Select dataloggerkey, SUM(Timestep)/(60*24) */to convert mins to days*/
From MDT
Where SUM(Timestep)/(60*24)<8 */to sort out only those dataloggerkey data where the total timestep is less than one week*/
Group by dataloggerkey;
Problem is I can't have an aggregate function in the where clause. Can you help me with a workaround? Or is the easiest way to tackle this to have this same query make a new table with a field that is SUM(Timestep)/(60*24) as Days and then sort that table by Days<8?
Thanks in advance.