Madisum ftx
    Updated 2023-04-13
    with df as (select * FROM ethereum.core.ez_current_balances
    where USER_ADDRESS in (lower('0x2faf487a4414fe77e2327f0bf4ae2a264a776ad2'), lower('0xc098b2a3aa256d2140208c3de6543aaef5cd3a94')))

    select sum(amount_usd) from (
    select symbol as token, amount as amount_usd from (
    SELECT
    max(LAST_ACTIVITY_BLOCK_TIMESTAMP) as last_date,
    symbol, sum(USD_VALUE_NOW) as amount
    from df
    where USD_VALUE_NOW > 0 and symbol != 'BTMXBULL' and symbol != 'KCAL'
    group by 2
    order by 3 desc))


    Run a query to Download Data