MLDZMNCopy of MM4
    Updated 2023-02-02
    with tb1 as (select
    hour::date as day,
    avg(price) as price
    from ethereum.core.fact_hourly_token_prices where SYMBOL = 'WETH'
    group by 1),




    tb4 as (select
    date_trunc('day',TIMESTAMP) as day,
    TOKEN_CONTRACT,
    Symbol,
    avg(price_usd) as price_token
    from flow.core.fact_prices
    group by 1,2,3
    )


    ,Adidas as (select
    distinct BUYER_ADDRESS as top_purchaser,
    count(distinct tx_hash) as sale_no,

    --count(distinct SELLER_ADDRESS) as seller_no,

    sum(PRICE_USD) as volume_usd,
    row_number() over (order by sale_no desc) as rank1
    from ethereum.core.ez_nft_sales
    where PRICE_USD::float > 0
    and nft_address = '0xba0c9cf4da821dba98407cc4f9c11f6c7a5f9bbc'
    and price>0 group by 1
    )


    Run a query to Download Data