mz0111open analyse 2
    Updated 2022-09-25
    (with tab1 as(select
    distinct BUYER_ADDRESS as "addr",
    max(BLOCK_TIMESTAMP):: DATE as "last nft buy",
    count(*) as "nft buy"
    from ethereum.core.ez_nft_sales
    where EVENT_TYPE = 'sale'
    and CURRENCY_SYMBOL = 'ETH'
    group by 1
    order by 3 DESC
    )
    SELECT
    distinct(ORIGIN_FROM_ADDRESS) as "add",
    max(BLOCK_TIMESTAMP) :: date as "last swap",
    'ETH' AS "BLOCKCHAIN",
    count(*) as "swap num",
    "nft buy",
    "last nft buy",
    DATEDIFF( day,"last swap","last nft buy" ) as "time diffrence",
    case when "time diffrence" < 0 then -("time diffrence")
    else ("time diffrence")
    end as timediff
    from ethereum.core.ez_dex_swaps b
    join tab1 a on a."addr" = b.ORIGIN_FROM_ADDRESS
    group by 1 , 5 , 6
    order by 5 desc
    limit 10
    )

    UNION ALL

    (with tab1 as
    (select
    distinct PURCHASER as "addr",
    max(BLOCK_TIMESTAMP):: DATE as "last nft buy",
    Run a query to Download Data