diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java index 36ff2f17d7..0308509dec 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java @@ -560,7 +560,7 @@ public String generateGroupByQuery( resultsInfo.getDataContainer(), getSqlDialectFromConnection(dataSource.getContainer()), contextInfo.getProcessor().getSyntaxManager(), - columnsList, + columnsList.stream().map(s -> SQLGroupingAttribute.makeCustom(dataSource, s)).toList(), functions == null ? List.of(SQLGroupingQueryGenerator.DEFAULT_FUNCTION) : functions, // backward compatibility CommonUtils.getBoolean(showDuplicatesOnly, false)); return groupingQueryGenerator.generateGroupingQuery(resultsInfo.getQueryText());