Hi all,
I have the following format for recording data in influxdb:
yield_data_points = [
{
"measurement": session,
"tags": {"runNum": runNo,"Month":iMonth,"Year":iYear,
},
"time": timestamp,
"fields": {
"Daily yield":Daily_Yield
}
}
]
return yield_data_points
runNo values can be 1, 2, 3 or 4. iMonth and iYear are current month and year. I record Daily_Yield value from 4 different sources once per day.
I want to make sum of Daily_Yield for any given month. I tried the following:
`SELECT sum("Daily_Yield") FROM "MPPT YIELD" WHERE ("runNum" = '1' OR "runNum" = '2' OR "runNum" = '3' OR "runNum" = '4' AND "Month" = '3' AND "Year" = '2020') AND $timeFilter GROUP BY "Month"`
But this query does not return sum of all Daily_Yield per selected month.
What am I doing wrong?
Thanks in advance.