samSession 3: Price table, Joins & Unions
    Updated 2025-03-22
    /*
    Go through homework 2 - many ways to group the data

    price tables

    joins


    */


    -- Homework 2 review

    -- select
    -- platform_name as marketplaces,
    -- sum (platform_fee_usd) as fees,
    -- sum (price_usd) as volume
    -- from ethereum.nft.ez_nft_sales
    -- where block_timestamp::date = current_date - interval '30 days'
    -- group by marketplaces
    -- order by volume desc, fees desc

    -- with raw_deposits as (
    -- select
    -- block_timestamp::date as days,
    -- event_name,
    -- contract_address,
    -- decoded_log
    -- from ethereum.core.ez_decoded_event_logs
    -- where block_timestamp::date >= '2025-03-01'
    -- and contract_address in (
    -- '0xae7ab96520de3a18e5e111b5eaab095312d7fe84', -- steth
    -- lower('0xae78736Cd615f374D3085123A210448E74Fc6393') -- reth
    -- )
    -- ),

    Last run: 3 months ago
    DAY
    SUM_TX_FEE_USD
    1
    2025-03-21 00:00:00.000415159.242042158
    2
    2025-03-20 00:00:00.000536432.560570056
    3
    2025-03-22 00:00:00.000208156.503961671
    3
    136B
    1s