I'm receiving data from a control system that's coming in three columns, DateTime (time stamp), InstrumentID (the transmitter that's sending the data), and Fluid (the reading from the instrument). I need to create a table that I can use to create a chart to compare trends.
Here's the query that I was able to generate with the helper, but it's averaged over an entire day. I need the table to have the average values over 10 minutes. I don't know if this will make a difference or not, but the DateTime for each InstrumentID data point doesn't necessarily match up.
I was just trying to get it to work for one transmitter first. It take a little while for the query to go through the mountain of data I have.
By accident, I managed to figure out how to get hourly values by changing the Format statement. Not sure where to go from there, however.
Here's the SQL I have so far. Your help is much appreciated!
Thanks!!
Matt
Here's the query that I was able to generate with the helper, but it's averaged over an entire day. I need the table to have the average values over 10 minutes. I don't know if this will make a difference or not, but the DateTime for each InstrumentID data point doesn't necessarily match up.
I was just trying to get it to work for one transmitter first. It take a little while for the query to go through the mountain of data I have.
By accident, I managed to figure out how to get hourly values by changing the Format statement. Not sure where to go from there, however.
Here's the SQL I have so far. Your help is much appreciated!
SQL:
TRANSFORM Avg([All Data].Fluid) AS AvgOfFluid
SELECT Format([DateTime],"mm/dd/yyyy hh") AS [Date]
FROM [All Data]
WHERE (((Format([DateTime],"Short Date"))>=#10/12/2013# And (Format([DateTime],"Short Date"))<#10/14/2013#) AND (([All Data].TransmitterID)="Transmitter1"))
GROUP BY Format([DateTime],"mm/dd/yyyy hh")
PIVOT [All Data].TransmitterID;
Thanks!!
Matt