On Wednesday, October 26, 2016 at 12:55:25 PM UTC-5, [email protected] wrote: > Is it possible percentage calculations using counts in influx? > > I have dailyTask counts that have a status that is set to passed or failed. > > I created a continuous query to do the daily calculation > > CREATE CONTINUOUS QUERY cqDailyTasks ON r1metrics BEGIN SELECT count(*) INTO > metrics..dailyTasks FROM metrics..tasks GROUP BY time(1d), * END > > > > Now I want the daily percentage of tasks that passed > > allPassed := select count_value dailyTask where status = passed group by > time(1d) > allFailed := select count_value dailyTask where status = failed group by > time(1d) > > select allPassed / (allPassed + allFailed) from something group by time (1d) > > Thanks
It looks like influx USE to support joins but was drop. I guess the only way to do this is to create a batch script in kapacitor and write to another table. Is that right? -- Remember to include the version number! --- You received this message because you are subscribed to the Google Groups "InfluxData" 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/3adb907e-8bf0-493a-9069-d6df8ece264b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
