Query editor
with changed_balances as (selectblockchain,day,address,token_symbol,token_address,token_standard,token_id,balance,balance_usd,lead(cast(day as timestamp)) over (partition by token_address,address,token_id order by day asc) as next_update_dayfrom tokens_ethereum.balances_dailywhere day < date(date_trunc('day',now())) and token_standard = 'erc20' and token_address = 0x9a26f5433671751c3276a065f57e5a02d2817973), days as (select *from unnest(sequence(cast('2015-01-01' as date), date(date_trunc('day',now())), interval '1' day)) as foo(day)), forward_fill as (selectblockchain,cast(d.day as timestamp) as day,address,token_symbol,token_address,token_standard,token_id,balance,balance_usdfrom days dleft join changed_balances bON d.day >= b.dayand (b.next_update_day is null OR d.day < b.next_update_day) -- perform forward fill--where d.day >= date '2015-01-01'), balances as (selectb.*from(select * from forward_fillwhere balance > 0) b)select day, SUM(balance) AS balance, COUNT(token_address) AS wallet_countfrom balanceswhere day > CURRENT_DATE - INTERVAL '1' monthgroup by day, balance_usdorder by balance_usdLIMIT 100