mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix the query to return the count of events
Left join was causing events to counted multiple times (once per participation). Using DISTINCT fixes this.
This commit is contained in:
parent
681f637d13
commit
20af766cdf
@ -94,7 +94,7 @@ readonly class CountEvents implements ExportInterface, GroupedExportInterface
|
|||||||
->leftJoin('event.participations', 'epart')
|
->leftJoin('event.participations', 'epart')
|
||||||
->leftJoin('epart.person', 'person');
|
->leftJoin('epart.person', 'person');
|
||||||
|
|
||||||
$qb->select('COUNT(event.id) as export_count_event');
|
$qb->select('COUNT(DISTINCT event.id) as export_count_event');
|
||||||
|
|
||||||
if ($this->filterStatsByCenters) {
|
if ($this->filterStatsByCenters) {
|
||||||
$qb
|
$qb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user