MostafaUntitled Query
    Updated 2022-08-30
    with Base as ( select avg(price) as price, date_trunc('week',hour) as days from ethereum.core.fact_hourly_token_prices where SYMBOL ilike 'weth' group by days)

    select date_trunc('week',block_timestamp) as days, count(distinct SELLER_ADDRESS) as seller,
    count(distinct TX_HASH) as TXs, count(distinct TOKENID) as TOKEN,
    count(distinct BUYER_ADDRESS) as buyer, sum(s.PRICE) as ETH_Volume,
    Base.price as ETH_Price, sum (PRICE_USD) as USD_Volume
    from ethereum.core.ez_nft_sales s join Base on s.BLOCK_TIMESTAMP::date = Base.days
    where project_name = 'cryptopunks' and seller_address != '0x0000000000000000000000000000000000000000'
    and EVENT_TYPE = 'sale' and tx_hash != '0x92488a00dfa0746c300c66a716e6cc11ba9c0f9d40d8c58e792cc7fcebf432d0' and Base.price <> 0 group by 1,Base.price

    Run a query to Download Data