Query editor
with prices_usd as (selectminute,price,decimals,contract_addressfrom prices.usdwhereblockchain = 'ethereum'and minute > cast('2021-05-01 00:00' as timestamp) /* start of v3 */),pool_info as(selecttoken0,token1,fee,tickSpacingfrom uniswap_v3_ethereum.Factory_evt_PoolCreatedwherepool = {{Pool}}),pool_info_with_price as(selectt0.minute as minute,token0,token1,fee,tickSpacing,t0.decimals as t0_decimals,t0.price as t0_price,t1.decimals as t1_decimals,t1.price as t1_price,row_number() over (partition by date_trunc('day',t0.minute) order by t0.minute desc) as row_number_descfrom pool_infoleft join prices_usd t0 on (t0.contract_address = token0)left join prices_usd t1 on (t1.contract_address = token1 and t0.minute = t1.minute)),liquidity_mint as(selectevt_block_number,evt_block_time,evt_tx_hash,cast(amount0 as double) as token0_amount,cast(amount1 as double) as token1_amount,tickLower,pow(1.0001,tickLower) as price_low,tickUpper,pow(1.0001,tickUpper) as price_highfrom uniswap_v3_ethereum.Pair_evt_Mintwhere