0xbrun0delta_in_usdt_balance
    Updated 2023-03-01
    with
    y as (
    select
    user_address,
    block_timestamp,
    balance,
    ROW_NUMBER() OVER (
    PARTITION BY
    user_address
    ORDER BY
    block_timestamp DESC
    ) AS row_num
    from
    ethereum.core.fact_token_balances
    where
    contract_address = '0xdac17f958d2ee523a2206206994597c13d831ec7'
    and block_timestamp < current_timestamp() - interval '1day'
    qualify
    row_num = 1
    ),
    t as (
    select
    user_address,
    block_timestamp,
    balance,
    ROW_NUMBER() OVER (
    PARTITION BY
    user_address
    ORDER BY
    block_timestamp DESC
    ) AS row_num
    from
    ethereum.core.fact_token_balances
    where
    contract_address = '0xdac17f958d2ee523a2206206994597c13d831ec7'
    qualify
    Run a query to Download Data