diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php index 25205d46a..f1c0d60ad 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php @@ -56,7 +56,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa Join::WITH, $qb->expr()->andX( 'IDENTITY(acp_geog_agg_address_person_location.person) = IDENTITY(acp_geog_agg_location_history.personLocation)', - 'acp_geog_agg_address_person_location.validFrom < :acp_geog_aggregator_date', + 'acp_geog_agg_address_person_location.validFrom <= :acp_geog_aggregator_date', $qb->expr()->orX( 'acp_geog_agg_address_person_location.validTo > :acp_geog_aggregator_date', $qb->expr()->isNull('acp_geog_agg_address_person_location.validTo')