fix(events): add GROUP BY to getEventDataEvents no-event relational branch
The no-event branch selects event_name, data_key and data_type alongside count(*) without a GROUP BY, which throws on PostgreSQL (42803) and on MySQL with ONLY_FULL_GROUP_BY. The event-filtered branch and both ClickHouse branches already group correctly. Fixes #4359.
This commit is contained in:
1 parent
f525898b79
commit
7b2a235741
1 file changed
+1
@@ -70,6 +70,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
||||
where event_data.website_id = {{websiteId::uuid}}
|
||||
and event_data.created_at between {{startDate}} and {{endDate}}
|
||||
${filterQuery}
|
||||
group by website_event.event_name, event_data.data_key, event_data.data_type
|
||||
limit 500
|
||||
`,
|
||||
queryParams,
|
||||
|
||||
Reference in new issue
Block a user