From 3f0332add57e7b63541460ca76c00e1bbc23d9a6 Mon Sep 17 00:00:00 2001 From: romanetar Date: Mon, 26 Oct 2026 15:50:00 +0100 Subject: [PATCH] fix(mysql): make stats and promo code queries compatible with ONLY_FULL_GROUP_BY Order check-in and ticket stats by MIN() of the raw date and wrap non-grouped sponsor/tier names in ANY_VALUE() so the queries run with stock sql_mode. --- app/Models/Foundation/Summit/SummitRegistrationStats.php | 4 ++-- .../DoctrineSummitRegistrationPromoCodeRepository.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Models/Foundation/Summit/SummitRegistrationStats.php b/app/Models/Foundation/Summit/SummitRegistrationStats.php index 37aad51aa..c757f9850 100644 --- a/app/Models/Foundation/Summit/SummitRegistrationStats.php +++ b/app/Models/Foundation/Summit/SummitRegistrationStats.php @@ -731,7 +731,7 @@ public function getAttendeesCheckinsGroupedBy } // group by $sql .= " GROUP BY DATE_FORMAT(CONVERT_TZ(SummitAttendee.SummitHallCheckedInDate,'+00:00','{$offset}'), '{$date_format}')"; - $sql .= " ORDER BY SummitAttendee.SummitHallCheckedInDate ASC"; + $sql .= " ORDER BY MIN(SummitAttendee.SummitHallCheckedInDate) ASC"; $count_sql = <<