KaskoazulGodMode Recoup - Allow List prior activity NFT purchases
    Updated 2022-06-08
    with early_minter as (
    select nft_to_address,
    case mint_price_eth
    when 0 then 'Freebie'
    when 0.1 then 'Allow list'
    else 'Monster'
    end as minter_type
    from ethereum.core.ez_nft_mints
    where nft_address = lower('0x903E2F5d42EE23156D548DD46bb84B7873789E44')
    and block_timestamp < '2022-06-07 17:00:00'
    and minter_type = 'Allow list'
    order by block_timestamp),

    addresses as (select nft_to_address as minters
    from early_minter
    group by 1),

    nft_sales_to as (
    select *
    from ethereum.core.ez_nft_sales
    where buyer_address in (select minters from addresses)
    and block_timestamp >= '2022-01-07'
    ),

    nft_sales_from as (
    select origin_from_address as minter,
    platform_name as marketplace,
    count (distinct tx_hash) as number_buys,
    sum (price_usd) as sale_vol,
    sum(total_fees_usd) as fees_vol,
    sum (tx_fee_usd) as gas_fees_vol
    from ethereum.core.ez_nft_sales
    where minter in (select minters from addresses)
    and block_timestamp >= '2022-01-07'
    group by 1,2
    )
    Run a query to Download Data