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/with lockLP as (select *from unicrypt_ethereum.UniswapV2Locker_call_lockLPToken-- locked LP in 7 dayswhere call_block_time > date_trunc('day', NOW() - interval '7' day) and call_success = true),uniswapV2lps as (select *from(select * , row_number() over ( PARTITION BY contract_address order by call_block_time desc) as group_idxfrom uniswap_v2_ethereum.Pair_call_getReserveswhere call_block_time > NOW() - interval '7' day and output__reserve1 is not null) swhere s.group_idx = 1)select llp.call_block_time,llp._amount,'<a href="https://www.dextools.io/app/en/ether/pair-explorer/' || llp._lpToken || '" target="_blank" >' || substr(llp._lpToken,1,5) || '...' || substr(llp._lpToken, 39, 44) || '</a>' AS pair_address,llp._referral,llp._unlock_date,'<a href="https://etherscan.io/address/' || llp._withdrawer || '" target="_blank" >' || substr(llp._withdrawer,1,5) || '...' || substr(llp._withdrawer, 39, 44) || '</a>' AS withdrawer_address,cast(ulp.output__reserve1 as DOUBLE) / 1e18 as pooled_wethfrom lockLP llpleft join uniswapV2lps ulp on llp._lpToken = ulp.contract_addressorder by 1 desc