Query editor
withlrts as (SELECTtoken_address,token_symbol,blockchain,secondary_trait as token_typeFROMdune.ether_fi.result_tokens_traitswhere secondary_trait in ('lrt', 'lst')and primary_trait = 'staking_assets'and blockchain = 'ethereum'),oracle_rates as (selectblock_day as day,date_trunc('minute', block_time) as minute,date_trunc('hour', block_time) as hour,rop.token_address,exchange_rate as eth_ratefromdune.ether_fi.result_tokens_rates_oracle_pegs ropinner joinlrts lron rop.token_address = lr.token_addressand rop.token_blockchain = 'ethereum'and lower(rop.underlying_asset_symbol) in ('weth', 'eth')),eth_price as (SELECTdate_trunc('hour', minute) as hour,MAX_BY(price, minute) as priceFROMdune.ether_fi.result_tokens_prices_usdWHERE blockchain = 'ethereum'AND contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2GROUP BY 1)SELECTc.day,c.hour,c.minute,c.token_address,t.token_symbol,t.token_type,c.eth_rate,c.eth_rate * COALESCE(p.price, ep.price) as usd_price,cast(now() as timestamp) as last_updated,240 as minutes_interval,'Oracle Rates V1' as matview_nameFROMoracle_rates cINNER JOINlrts t -- eth derivatives token lables https://dune.com/queries/3842197ON c.token_address = t.token_addressAND t.blockchain = 'ethereum'