Add table alias to filterQuery. Closed  #3869
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run

This commit is contained in:
Francis Cao 2025-12-19 13:32:20 -08:00
parent 86d2672c47
commit 3072f02f1b
2 changed files with 14 additions and 7 deletions

View file

@ -41,14 +41,15 @@ async function relationalQuery(
currency,
});
const joinQuery = filterQuery
? `join website_event
const joinQuery =
filterQuery || cohortQuery
? `join website_event
on website_event.website_id = revenue.website_id
and website_event.session_id = revenue.session_id
and website_event.event_id = revenue.event_id
and website_event.website_id = {{websiteId::uuid}}
and website_event.created_at between {{startDate}} and {{endDate}}`
: '';
: '';
const chart = await rawQuery(
`