Query editor
withpendle_eth_user_balances as(selectday,blockchain,address,sum(sum(token_amount)) over(partition by blockchain, address order by day) daily_cumulative_balancefrom(selectdate_trunc('day', evt_block_time) day,'Ethereum' blockchain,"from" address,-(value/1e18) token_amountfrom erc20_ethereum.evt_Transferwhere contract_address = 0x808507121B80c02388fAd14726482e061B8da827and "from" != 0x0000000000000000000000000000000000000000union allselectdate_trunc('day', evt_block_time) day,'Ethereum' blockchain,"to" address,value/1e18 token_amountfrom erc20_ethereum.evt_Transferwhere contract_address = 0x808507121B80c02388fAd14726482e061B8da827and "to" != 0x0000000000000000000000000000000000000000--добавить другие блокчейны и сгруппировать - день, блокчейн, адрессunion allselectdate_trunc('day', evt_block_time) day,'Arbitrum' blockchain,"from" address,-(value/1e18) token_amountfrom erc20_arbitrum.evt_Transferwhere contract_address = 0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8and "from" != 0x0000000000000000000000000000000000000000union allselectdate_trunc('day', evt_block_time) day,'Arbitrum' blockchain,"to" address,value/1e18 token_amountfrom erc20_arbitrum.evt_Transferwhere contract_address = 0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8and "to" != 0x0000000000000000000000000000000000000000union allselectdate_trunc('day', evt_block_time) day,'BSC' blockchain,"from" address,-(value/1e18) token_amountfrom erc20_bnb.evt_Transferwhere contract_address = 0xb3Ed0A426155B79B898849803E3B36552f7ED507and "from" != 0x0000000000000000000000000000000000000000