diff --git a/public/app/plugins/datasource/postgres/postgres_query.ts b/public/app/plugins/datasource/postgres/postgres_query.ts index 9a36a838c82..9e32736b405 100644 --- a/public/app/plugins/datasource/postgres/postgres_query.ts +++ b/public/app/plugins/datasource/postgres/postgres_query.ts @@ -245,7 +245,7 @@ export default class PostgresQuery { } switch (special.params[0]) { case 'increase': - query = query + ' - lag(' + query + ') OVER ()'; + query = query + ' - lag(' + query + ') OVER (' + over + ')'; break; case 'rate': let timeColumn = target.timeColumn;