to_ck/充值视图.sql
2021-08-03 17:51:21 +08:00

13 lines
571 B
SQL

drop table if exists xiangsu.recharge_game;
create view xiangsu.recharge_game as
select toDate(addHours(`#event_time`, `#zone_offset`)) as date,
`#os`,
`#bundle_id`,
owner_name,
channel,
arrayDistinct(groupArray(binduid)) as account,
length(account) as account_num,
sum(money) as money
from xiangsu.event
where `#event_name` = 'rechargeGame'
group by toDate(addHours(`#event_time`, `#zone_offset`)), `#os`, `#bundle_id`, owner_name, channel