Query editor
WITH cte1 AS (SELECTevt_block_time,id,"to",ROW_NUMBER() OVER(PARTITION BY id ORDER BY evt_block_time DESC) as rnFROM ethereumnameservice_ethereum.NameWrapper_evt_TransferSingle),cte2 AS (SELECTstorefront.evt_block_time,storefront.id,from_utf8(namewrapper.name) name,cast(json_query(storefront.config, 'strict $.price') as uint256) / 1e18 dollarPrice,json_query(storefront.config, 'strict $.owner' OMIT QUOTES) owner,json_query(storefront.config, 'strict $.isForSale') isForSale,ROW_NUMBER() OVER(PARTITION BY bytearray_to_uint256(namewrapper.node) ORDER BY storefront.evt_block_time DESC) as rnFROM ens_vision_subname_registrar_ethereum.EnsSubdomainStorefront_v2_evt_ConfigureSubdomain storefrontINNER JOIN ethereumnameservice_ethereum.NameWrapper_evt_NameWrapped namewrapperON bytearray_to_uint256(namewrapper.node) = storefront.id)SELECTsubstring(cte2.name, 2, length(cte2.name)-6),cte2.dollarPrice,cast(cte2.owner as varchar) owner,concat('https://ens.vision/name/', substring(cte2.name, 2, length(cte2.name)-6)) urlFROM cte1JOIN cte2 ON cast(cte1.to as varchar) = cte2.ownerand cte1.id = cte2.idWHERE cte1.rn = 1 AND cte2.rn = 1 and cte2.isForSale = 'true'