We have a ODBC connection with PI and we need to build a query using a GROUP BY clause.
This is the example:
day(time) -1 as dia, max(value) as prod_real
tag = 'LPBQ1.Producao_Toneladas_Diario'
and year(time) = year('t')
and month(time) = month('t')
and day(time) > 1
and hour(time) < 1
group by day(time) -1
When we take off the GROUP BY clause it works.