Query editor
select address,token_name,sum(case when last_one = 'Y' then cumul_amount end) as last_amount,sum(cast(mm as double)/1000/60/60/24 * cumul_amount) as pointsfrom query_5378262group by 1,2order by 1,2
Query editor
1select address2,token_name3,sum(case when last_one = 'Y' then cumul_amount end) as last_amount4,sum(cast(mm as double)/1000/60/60/24 * cumul_amount) as points5from query_53782626group by 1,27order by 1,2