Abbas_ra21Daily 3.5
    Updated 2024-11-28

    select
    date_trunc('{{Interval}}',BLOCK_TIMESTAMP) AS Date,
    TOKEN_SYMBOL AS Token,
    sum(
    case
    when Amount_USD is not null then Amount_USD
    else Amount * Price
    end
    ) AS Volume
    from
    base.defi.ez_lending_borrows A
    inner join base.price.ez_prices_hourly B on B.TOKEN_ADDRESS = A.TOKEN_ADDRESS
    and HOUR = date_trunc('hour', BLOCK_TIMESTAMP)
    where
    PLATFORM = 'Seamless' and BLOCK_TIMESTAMP >= '{{Start_Date}}'
    group by
    1,2


    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived