nsa2000nfts9
    Updated 2023-01-05
    ---credit to Ali3N: https://app.flipsidecrypto.com/dashboard/RH4QME
    with mintable as (
    select nft_address,
    min (date_trunc(month,block_timestamp)) as mindate
    from ethereum.core.ez_nft_sales
    where block_timestamp::date >= '2022-01-01' and block_timestamp::date < '2023-01-01'
    group by 1),

    maxtable as (
    select nft_address,
    max (date_trunc(month,block_timestamp)) as maxdate
    from ethereum.core.ez_nft_sales
    where block_timestamp::date >= '2022-01-01' and block_timestamp::date < '2023-01-01'
    group by 1),

    previous_table as (
    select t1.nft_address,
    coalesce (initcap(project_name),initcap(address_name),initcap(t1.nft_address)) as Project_Title,
    median (price_usd) as Previous_Price
    from ethereum.core.ez_nft_sales t1 left outer join ethereum.core.dim_labels t2 on t1.nft_address = t2.address
    join mintable t3 on t1.nft_address = t3.nft_address
    where price_usd > 0
    and date_trunc(month,block_timestamp) = mindate
    group by 1,2)

    select Project_Title,
    case when project_title = '0x45b5e0a3c6dae8c8170fd78268f807758226b67f' then 'AnifruktNFT (AFT)'
    when project_title = '0x6d1b09ae12adeaa3aa5d6b574dbcfaf7343a0b04' then 'Space Eggs (SPACE EGGS)'
    when project_title = '0x3f427073af2e9a26b0d5897435af9edd8b00efa6' then 'Ethnology (ETL)'
    when project_title = '0xb77bb4bda2e4cfec036f214594e758ac380d0f45' then 'Cool Cats Research Lab (CCLAB)'
    when project_Title = '0xeb6c5accafd8515c1b9e4c794bdc41532c5543ec' then 'DGFamily (DGFAM)'
    when project_Title = '0xd7e97cb08bb8f2ce9e984b6295272286d6424717' then 'MoonPings (MPINGS)'
    when project_Title = '0x030ca311c3a971afed275329945cd88c4f74dfcc' then 'MUKYO'
    when project_Title = '0xff063937523c4514179a4d9a6769694baab357a8' then '888 Inner Circle - Pink Realm (888P)'
    when project_Title = '0x05da517b1bf9999b7762eaefa8372341a1a47559' then 'Keepers (KPR)'
    when project_Title = '0x9d7caf9ff78b1edad4500bccfb8e52ffc15dafce' then 'LOOK LABS End Game (EG)'
    Run a query to Download Data