Query editor
selectevt_tx_hash,evt_block_time,borrow_asset,amount/power(10,decimals) as amount,version,symbol,decimals,price,base_dim.stat_date as stat_date,chainfrom(selectevt_tx_hash,evt_block_time,_amount as amount,case when _reserve=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee then 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 else _reserve end as borrow_asset,'v1' as version,'ethereum' as chain,date_trunc('day',evt_block_time) as stat_datefrom aave_ethereum.LendingPool_evt_Borrowwhere evt_block_time>timestamp '2023-01-01'union allselectevt_tx_hash,evt_block_time,amount,case when reserve=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee then 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 else reserve end as borrow_asset,'v2' as version,'ethereum' as chain,date_trunc('day',evt_block_time) as stat_datefrom aave_v2_ethereum.LendingPool_evt_Borrowwhere evt_block_time>timestamp '2023-01-01'union allselectevt_tx_hash,evt_block_time,amount,case when reserve=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee then 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 else reserve end as borrow_asset,'v2' as version,'polygon' as chain,date_trunc('day',evt_block_time) as stat_datefrom aave_v2_polygon.LendingPool_evt_Borrowwhere evt_block_time>timestamp '2023-01-01'union allselectevt_tx_hash,evt_block_time,amount,case when reserve=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee then 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 else reserve end as borrow_asset,'v2' as version,'avalanche_c' as chain