13 lines
571 B
SQL
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 |