diff --git a/backend/pkg/api/data_access/vdb_summary.go b/backend/pkg/api/data_access/vdb_summary.go index 0927696ef..a8165344a 100644 --- a/backend/pkg/api/data_access/vdb_summary.go +++ b/backend/pkg/api/data_access/vdb_summary.go @@ -526,7 +526,7 @@ func (d *DataAccessService) GetValidatorDashboardGroupSummary(ctx context.Contex var totalMissedRewardsEl float64 // Define the `targets` CTE - targets := goqu. + targets := goqu.Dialect("postgres"). From("blocks"). Select(goqu.I("blocks.slot").As("slot")). Where( @@ -580,7 +580,7 @@ func (d *DataAccessService) GetValidatorDashboardGroupSummary(ctx context.Contex Select(goqu.L("COALESCE(SUM(v), 0)")) // Generate SQL and arguments - sql, args, err := query.ToSQL() + sql, args, err := query.Prepared(true).ToSQL() if err != nil { return 0, fmt.Errorf("failed to generate SQL: %w", err) }