mlhCount of buyers based on USD volume of purchase in 10 days before and after the thanksgiving league
    Updated 2022-12-04
    select period,
    case when USD_Volume < 5 then 'paid less than $5'
    when USD_Volume >= 5 and USD_Volume < 10 then 'paid between $5 to $10'
    when USD_Volume >= 10 and USD_Volume < 20 then 'paid between $10 to $20'
    when USD_Volume >= 20 and USD_Volume < 50 then 'paid between $20 to $50'
    when USD_Volume >= 50 and USD_Volume < 100 then 'paid between $50 to $100'
    else 'paid more than $100' end as volume_type,
    count (distinct buyer) as buyers
    from(select case when block_timestamp>='2022-11-24' then 'during thansgiving league'
    else '10 days before thanksgiving league' end as period,
    buyer, sum (case when currency = 'A.1654653399040a61.FlowToken' then price*usdprice
    else price end) as USD_Volume
    from flow.core.ez_nft_sales a join (select timestamp::date as day,
    avg (price_usd) as usdprice
    from flow.core.fact_prices
    where symbol = 'FLOW'
    and source = 'coinmarketcap'
    group by 1) b on a.block_timestamp::Date = b.day
    where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
    and tx_succeeded = 'TRUE'
    and block_timestamp >= '2022-11-14'
    group by 1, 2)
    group by 1,2
    Run a query to Download Data