@Override
    public DataResult<String> getGroupBySql(GroupByParam param) {
        // - Retrieve the SqlBuilder instance from Chat2DBContext
        SqlBuilder sqlBuilder = Chat2DBContext.getSqlBuilder();
        // Build the GROUP BY SQL using the provided parameters
        String groupSql = sqlBuilder.buildGroupBySql(param.getOriginSql(), param.getGroupByList());
        // Return the built SQL as a DataResult
        return DataResult.of(groupSql);
    }
The method getGroupBySql constructs a GROUP BY SQL query string from the provided parameters.

@param param - a GroupByParam object containing the original SQL query and the list of columns to group by
@return DataResult<String> - a DataResult object containing the constructed GROUP BY SQL query string
chat2db-server/chat2db-server-domain/chat2db-server-domain-core/src/main/java/ai/chat2db/server/domain/core/impl/DlTemplateServiceImpl.java