mucrypto2023-05-26 06:45 PM
    Updated 2023-05-26
    with dates as (
    select
    date_day
    from ethereum.core.dim_dates
    where date_day between '2023-02-01' and '2023-02-28'
    ),

    contract_address AS (
    SELECT
    *
    FROM
    (
    VALUES
    ('0xae7ab96520de3a18e5e111b5eaab095312d7fe84', 'USDC'), --stETH
    ('ETH', 'USDC')
    ) t (address, address_two)
    ),


    full_list as (
    select
    date_day,
    address,
    row_number() over (partition by address order by date_day asc) as row_number -- not used at all
    from dates
    cross join contract_address
    ),

    balances as (
    select
    block_timestamp::date as day,
    symbol,
    iff(contract_address is null, 'ETH', contract_address) as contract_addresses,
    current_bal_usd,
    prev_bal_usd

    Run a query to Download Data