diff --git a/api/src/modules/projects/projects.service.ts b/api/src/modules/projects/projects.service.ts index cd17f263..b56ac89e 100644 --- a/api/src/modules/projects/projects.service.ts +++ b/api/src/modules/projects/projects.service.ts @@ -30,14 +30,14 @@ export class ProjectsService extends AppBaseService< ): Promise { const qb = this.dataSource .createQueryBuilder() - .select('SUM(abatement_potential)::integer', 'maxAbatementPotential') + .select('SUM(abatement_potential)::BIGINT', 'maxAbatementPotential') .from(Project, 'project'); const { costRangeSelector } = query; if (costRangeSelector == COST_TYPE_SELECTOR.NPV) { - qb.addSelect('SUM(capex_npv + opex_npv)::integer', 'maxTotalCost'); + qb.addSelect('SUM(capex_npv + opex_npv)::BIGINT', 'maxTotalCost'); } else { - qb.addSelect('SUM(capex + opex)::integer', 'maxTotalCost'); + qb.addSelect('SUM(capex + opex)::BIGINT', 'maxTotalCost'); } const totalsQuery = this.applySearchFiltersToQueryBuilder(qb, query);