Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/withvault as (select call_block_time,call_tx_hash,output_0from jones_token_arbitrum.DpxEthBullVault_call_autoCompound),transactions as(select block_time,gas_used,effective_gas_price,hashfrom arbitrum.transactions),work as (select * from transactions tright join vault as v on t.hash=v.call_tx_hash),final as (selectdate_trunc('minute', block_time) as time,hash,(cast(effective_gas_price as double)*cast(gas_used as double))/1e18 as transaction_fee,cast(output_0 as double)/1e18 as output from work),eth_price as (selectdate_trunc('minute',minute) as time,pricefrom prices.usdwhere contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2AND minute >= now() - interval '180' day)select f.*,p.pricefrom final fleft join eth_price as p on f.time=p.time