add funnel updates to relational query

This commit is contained in:
Francis Cao 2024-04-02 00:32:19 -07:00
parent bc5e85c838
commit 6ee9bb07da
2 changed files with 4 additions and 3 deletions

View File

@ -34,7 +34,8 @@ const schema = {
value: yup.string().required(), value: yup.string().required(),
}), }),
) )
.min(2), .min(2)
.required(),
window: yup.number().positive().required(), window: yup.number().positive().required(),
dateRange: yup dateRange: yup
.object() .object()

View File

@ -82,7 +82,7 @@ async function relationalQuery(
from website_event from website_event
where website_id = {{websiteId::uuid}} where website_id = {{websiteId::uuid}}
and created_at between {{startDate}} and {{endDate}} and created_at between {{startDate}} and {{endDate}}
and ${column} ${operator} {param${i}:String} and ${column} ${operator} {{${i}}}
)`; )`;
} else { } else {
pv.levelQuery += ` pv.levelQuery += `
@ -96,7 +96,7 @@ async function relationalQuery(
`l.created_at `, `l.created_at `,
`${windowMinutes} minute`, `${windowMinutes} minute`,
)} )}
and we.${column} ${operator} {param${i}:String} and we.${column} ${operator} {{${i}}}
and we.created_at <= {{endDate}} and we.created_at <= {{endDate}}
)`; )`;
} }