Exactly what I needed. For future reference, this worked great:

> SELECT DERIVATIVE(ELAPSED(value),1u) FROM BPM WHERE pvName = 
'BR1:BPM2:ADC0:clip' AND time > '2016-09-12T18:03:27.012265443Z' and time < 
'2016-09-12T18:08:04.808883428Z' GROUP BY time(1u)
name: BPM
---------
time derivative
2016-09-12T18:03:27.211833238Z -1.0021657101646371e-05
2016-09-12T18:03:27.311616897Z -0.0023851600791668704
2016-09-12T18:03:27.411400794Z 0.0023851543901918363
2016-09-12T18:03:27.511184692Z 1.0021657001212761e-05
2016-09-12T18:03:27.610968589Z -1.0021657101646371e-05
2016-09-12T18:08:03.811050891Z 999.6387260417581
2016-09-12T18:08:03.91083455Z -2.7669891183585483e+06
2016-09-12T18:08:04.010612726Z -0.0549518964948808
2016-09-12T18:08:04.110396623Z 0.05733390027851889
2016-09-12T18:08:04.210180521Z 1.0021657001212761e-05
2016-09-12T18:08:04.309964179Z -0.002405203465280858
2016-09-12T18:08:04.409748077Z 0.0024051976802910626
2016-09-12T18:08:04.509531974Z -1.0021657101646371e-05
2016-09-12T18:08:04.609315872Z 1.0021657001212761e-05
2016-09-12T18:08:04.709099531Z -0.0023951817601717733

Thanks,
Will

On Thursday, 29 September 2016 20:12:20 UTC-7, Sean Beckett wrote:
>
> In InfluxDB, only fields can be passed to functions. The timestamp is a 
> special column and cannot be referenced outside the WHERE clause.
>
> Perhaps ELAPSED() 
> <http://docs.influxdata.com/influxdb/v1.0/query_language/functions/#elapsed> 
> is what you need?
>
> On Thu, Sep 29, 2016 at 6:15 PM, William Cork <[email protected] 
> <javascript:>> wrote:
>
>> My attempts to call DERIVATIVE on the time column have failed miserably.
>>
>> > SELECT DERIVATIVE(time, 1s) FROM BPM WHERE pvName = 
>> 'BR1:BPM2:wfr:TBT:armed' GROUP BY pvName LIMIT 50
>> ERR: error parsing query: at least 1 non-time field must be queried
>> > SELECT pvName,DERIVATIVE(time, 1s) FROM BPM WHERE pvName = 
>> 'BR1:BPM2:wfr:TBT:armed' GROUP BY pvName LIMIT 50
>> ERR: error parsing query: mixing aggregate and non-aggregate queries is 
>> not supported
>>
>> Is there a way to characterise change in time in a series with Influx or 
>> does this calculation have to happen client side?
>>
>> Thanks.
>>
>> -- 
>> Remember to include the InfluxDB version number with all issue reports
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "InfluxDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/influxdb.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/influxdb/2ae4ca3b-06db-4637-bd9c-4b7b6133bff5%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/influxdb/2ae4ca3b-06db-4637-bd9c-4b7b6133bff5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Sean Beckett
> Director of Support and Professional Services
> InfluxDB
>

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/62421841-fe3e-4fcf-85bf-4c40dc434205%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to