Query editor
with filter as (select atoken_address, underlying_address, front_symbol from dune.alice_rozengarden.result_aave_pools),p as (select contract_address, price, minute from prices.usdwhere blockchain = 'arbitrum' and minute = date_trunc('day', cast('{{timestamp}}' as TIMESTAMP)) and contract_address in (select underlying_address from filter)),price2 as (select filter.atoken_address, filter.underlying_address, filter.front_symbol, p.price, p.minute from p inner join filter on filter.underlying_address = p.contract_address),raw as (select day, token_address, address, balance from tokens_arbitrum.balances_dailywhere day = date_trunc('day', cast('{{timestamp}}' as TIMESTAMP)) and token_standard = 'erc20' and token_address in (select atoken_address from filter)),all as (select day as "timestamp", token_address as pool_address, underlying_address as token_address, front_symbol as token_symbol, address as supplier_address, balance as supplied_amount, (balance * price) as supplied_usdfrom raw inner join price2 on raw.token_address = price2.atoken_address)select * from all where supplied_usd >= 1.0