SalehNFT Buying Behavior on Flow-hold or?
    Updated 2022-06-14
    with flow_whale as (
    select top 100
    buyer,
    count(DISTINCT tx_id) as sale_count,
    sum(price) as volume
    from flow.core.fact_nft_sales
    group by 1
    order by 3 desc
    )
    , flow as (
    select
    min(block_timestamp::date) as date ,
    buyer ,
    NFT_COLLECTION as nft
    from flow.core.fact_nft_sales
    where block_timestamp::date >= CURRENT_DATE-{{FilterDay}}
    and buyer in ( select buyer from flow_whale)
    group by 2,3
    order by 1
    )
    ,flow_sales as (
    select
    min(block_timestamp::date) as sale_date ,
    seller ,
    NFT_COLLECTION
    from flow.core.fact_nft_sales
    where block_timestamp::date >= CURRENT_DATE-{{FilterDay}}
    and seller in ( select buyer from flow)
    and nft_collection in ( select nft from flow)
    group by 2,3
    )
    ,final_flow as (
    select
    datediff(day,date , sale_date) as differ,
    buyer,
    seller ,
    Run a query to Download Data