SajjadiiiNFT Wallet Behavior Comparison sol 3
    Updated 2022-07-19
    with whale_sell_volume as (select SELLER ,
    sum(SALES_AMOUNT*40) as volume_usd---40 is price of sol
    from solana.core.fact_nft_sales
    where SUCCEEDED = 'TRUE'
    group by 1
    having sum(SALES_AMOUNT*40) >= {{total_sell_volume}}),

    date_tab as (
    select
    SELLER,
    Min(date_trunc('{{date}}', block_timestamp)) as min_date,
    Max(date_trunc('{{date}}', block_timestamp)) as max_date,
    count(*) as transactions
    from solana.core.fact_nft_sales
    where SELLER in (select SELLER from whale_sell_volume )
    group by 1
    having Min(date_trunc('{{date}}', block_timestamp)) < current_date - 2
    ),
    final as (
    select
    SELLER,
    avg(datediff('{{date}}', min_date, max_date))/avg(transactions) as "time between"
    from date_tab
    group by 1
    )
    select
    Case
    when "time between" < 1 then 'Less Than an {{date}} '
    when "time between" between 1 and 2 then 'Between 1 and 2 {{date}}'
    when "time between" between 2 and 5 then 'Between 2 and 5 {{date}}'
    when "time between" between 5 and 10 then 'Between 5 and 10 {{date}}'
    when "time between" between 10 and 15 then 'Between 10 and 15 {{date}}'
    when "time between" between 15 and 25 then 'Between 15 and 25 {{date}}'
    when "time between" between 25 and 50 then 'Between 25 and 50 {{date}}'
    when "time between" > 50 then 'more 50 {{date}}'
    END as "time between transaction",
    Run a query to Download Data