We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0e8b34 commit eb545b1Copy full SHA for eb545b1
src/cron/postAnalyticsClickhouse.ts
@@ -58,6 +58,11 @@ export const postAnalyticsClickhouseCron: Cron = {
58
sum(go_to_link) AS "goToLink"
59
FROM api.post_analytics
60
FINAL
61
+ WHERE post_id IN (
62
+ SELECT DISTINCT post_id
63
+ FROM api.post_analytics
64
+ WHERE created_at > {lastRunAt: DateTime}
65
+ )
66
GROUP BY id
67
HAVING "updatedAt" > {lastRunAt: DateTime}
68
ORDER BY "updatedAt" DESC;
0 commit comments