add subdivision1/2, cities to query logic

This commit is contained in:
Francis Cao 2023-02-20 09:04:20 -08:00
parent 6bacfa5892
commit 55a586fe27
16 changed files with 184 additions and 57 deletions

View file

@ -40,7 +40,10 @@ async function clickhouseQuery(websites: string[], startAt: Date) {
device,
screen,
language,
country
country,
subdivision1,
subdivision2,
city
from event
where ${websites && websites.length > 0 ? `website_id in {websites:Array(UUID)}` : '0 = 0'}
and created_at >= {startAt:DateTime('UTC')}`,