MoDeFi#Flow NFT Wallet Behavior Comparison 4
    Updated 2022-07-19
    with prices as
    (select TIMESTAMP::date as time, SYMBOL,TOKEN_CONTRACT, avg(PRICE_USD) as token_price
    from flow.core.fact_prices
    group by 1,2,3),

    flow_sales as
    (select BLOCK_TIMESTAMP::date as date, NFT_COLLECTION, NFT_ID, BUYER, PRICE,
    case
    when CURRENCY in ('A.4eded0de73020ca5.FazeUtilityCoin','A.ead892083b3e2c6c.DapperUtilityCoin','A.3c5959b568896393.FUSD') then 1
    else token_price
    end as token_prices, CURRENCY, SYMBOL, PRICE*token_prices as usd_price
    from flow.core.fact_nft_sales a
    left join prices b
    on date=time and CURRENCY=TOKEN_CONTRACT),

    whales as (
    select BUYER
    from
    ( select BUYER, count(*) as nft_count, sum(usd_price) as total_paid
    from flow_sales
    where usd_price is not null
    group by BUYER
    order by total_paid desc
    )
    where total_paid>=100000)



    select DATE, NFT_COLLECTION, count(*) as nft_count, sum(usd_price) as total_volume
    from flow_sales
    where BUYER in (select * from whales)
    group by 1,2
    Run a query to Download Data