mlhcrossover1
    Updated 2022-10-13
    with fin as (with base as (select--credit to Moe!
    ADDRESS_NAME as collection,
    s.*

    from optimism.core.ez_nft_sales s,optimism.core.dim_labels l
    where tx_hash is not NULL
    and NFT_ADDRESS = address
    and ADDRESS_NAME not ilike '%general contract%'
    )

    (with tb1 as (select
    count(distinct case when buyer_address in (select buyer_address from base where
    collection in (
    'apetimism' , 'optimistic explorer - get started nft' ,
    'dope wars hustlers','motorheadz','mirror wnft optimism collective: hello world'
    ,'optimistic apes','optichads','uniswap v3 positions nft-v1','elements of ganland','uniswap v3 positions nft-v1','elements of ganland'
    )) then buyer_address end ) as cross_addresses,
    count(distinct buyer_address) as total_addresses
    from base
    where
    collection = 'optipunk')
    select 100*cross_addresses/total_addresses as ratio,'optipunk' as collection
    from tb1
    )

    union all

    (with tb2 as (select
    count(distinct case when buyer_address in (select buyer_address from base where
    collection in (
    'optipunk' , 'optimistic explorer - get started nft' ,
    'dope wars hustlers','motorheadz','mirror wnft optimism collective: hello world'
    ,'optimistic apes','optichads','uniswap v3 positions nft-v1','elements of ganland'
    )) then buyer_address end ) as cross_addresses,
    Run a query to Download Data