drop table if exists xiangsu.new_account;
create view xiangsu.new_account as
select toDate(addHours(`#event_time`, `#zone_offset`)) as date,
       `#os`,
       `#bundle_id`,
       owner_name,
       channel,
       groupArray(`binduid`)                           as account,
       length(account)                                 as num
from xiangsu.event
where role_idx = 1
group by toDate(addHours(`#event_time`, `#zone_offset`)), `#os`, `#bundle_id`, owner_name, channel