Query editor
withtimeline as (select date_trunc('day', time) as dayfrom unnest(sequence(timestamp '2024-08-28',cast(NOW() as timestamp),interval '1' day)) as s(time)), tokens_all as (selectcontract_address as address, blockchain, symbol, decimals, contract_address as price_address, blockchain as price_blockchain, symbol as price_symbol, decimals as price_decimalsfrom tokens.erc20union allselect0x0000000000000000000000000000000000000000 as token_address, chain as blockchain, symbol, decimals, price_address, chain as price_blockchain, price_symbol, decimals as price_decimalsfrom tokens.nativewhere chain in ('ethereum', 'arbitrum')), ape_bridge_called as (selecttx_hash, block_time, date_trunc('day', block_time) as day, b.blockchain, tx_id, dst_chain_id, amount_in as amount_in_raw, token_in, token_out, receiver, user, t.symbol, cast(amount_in as double) / pow(10, t.decimals) as amount_in, t.price_address, t.price_symbol, t.price_decimals-- , cast(bytearray_to_int256(bytearray_ltrim(bytearray_substring(data, 65, 32))) as double) / pow(10, 18) as amount_receivedfrom (selectl.tx_hash