2844Untitled Query
    Updated 2022-04-03
    with swaps as (
    select
    last_day(block_timestamp,'week') as weekend,
    platform,
    count(distinct from_address) as users
    from (
    select
    block_timestamp,
    from_address,
    platform
    from ethereum.dex_swaps
    where platform != 'curve'
    )
    group by 1,2
    ),
    gas as (
    select
    last_day(block_timestamp,'week') as weekend,
    median(gwei) as median_gwei
    from (
    select
    block_timestamp,
    gas_price/pow(10,9) as gwei
    from ethereum.transactions
    )
    group by 1
    ),
    eth_price as (
    select
    last_day(hour,'week') as weekend,
    median(price) as eth_price
    from (
    select
    hour,
    price
    Run a query to Download Data