11 lines
463 B
SQL
11 lines
463 B
SQL
drop table if exists xiangsu.active_account;
|
|
create view xiangsu.active_account as
|
|
select toDate(addHours(`#event_time`, `#zone_offset`)) as date,
|
|
`#os`,
|
|
`#bundle_id`,
|
|
owner_name,
|
|
channel,
|
|
uniqCombined(binduid) as num,
|
|
arrayDistinct(groupArray(binduid)) as account
|
|
from xiangsu.event
|
|
group by toDate(addHours(`#event_time`, `#zone_offset`)), `#os`, `#bundle_id`, owner_name, channel |