metricsdaoStudent quiz question: sevpants quiz 3 q10: January 2023
    Updated 2023-01-25
    select
    sum(s.price_usd) as usd_vol,
    count(s.tx_hash) as num_sales,
    count(distinct s.tx_hash) as distinct_sales,
    avg(p.price) as avg_cur_price,
    s.currency_symbol
    -- ,currency_address

    from
    ethereum.core.ez_nft_sales s
    full outer join ethereum.core.fact_hourly_token_prices p
    on p.symbol = s.currency_symbol
    WHERE s.event_type = 'sale'
    AND s.block_timestamp::DATE between '2022-12-01' and '2022-12-31'
    AND p.hour::DATE between '2022-12-01' and '2022-12-31'
    and price_usd is not null

    group by
    s.currency_symbol
    -- , currency_address
    order by usd_vol desc
    limit 5
    Run a query to Download Data