A
A
alex995052017-11-12 11:08:31
excel
alex99505, 2017-11-12 11:08:31

How to set averaging by date (frequency) in the filter when selecting data?

I deduce the data on the sheet taken from the table of the server.
How, using a standard filter, to prescribe a condition for a selection by date?
For example, in the table there are records with a period of 1 m, but I want to receive with a frequency of 5 minutes. That is, 5 times less data.
SQL query looks like this

SELECT temp, DateTimeIn FROM info_once WHERE DATEPART(minute,DateTimeIn)%5=0

But how to write this in the filter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2017-11-12
@res2001

Something like that, IMHO.

select sum(temp), DTI from (
SELECT temp, datediff(minute,DateTimeIn, 0)%5 as DTI FROM info_once 
)
group by DTI

I can't test right now.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question