This commit is contained in:
Carl-Gerhard Lindesvärd
2024-08-01 22:30:59 +02:00
parent c5b3e57205
commit 286417146a

View File

@@ -114,11 +114,13 @@ export function getChartSql({
}
if (event.segment === 'property_sum' && event.property) {
sb.select.count = `sum(toFloat64OrNull(${getPropertyKey(event.property)})) as count`;
sb.select.count = `sum(toFloat64(${getPropertyKey(event.property)})) as count`;
sb.where.property = `${getPropertyKey(event.property)} IS NOT NULL`;
}
if (event.segment === 'property_average' && event.property) {
sb.select.count = `avg(toFloat64OrNull(${getPropertyKey(event.property)})) as count`;
sb.select.count = `avg(toFloat64(${getPropertyKey(event.property)})) as count`;
sb.where.property = `${getPropertyKey(event.property)} IS NOT NULL`;
}
if (event.segment === 'one_event_per_user') {