Abbas_ra21Daily 3.5
    Updated 2025-02-03
    -- forked from Daily 3.5 @ https://flipsidecrypto.xyz/edit/queries/f6ec6a55-2b55-42b7-a344-6be5268d9822


    select
    date_trunc('Week',block_timestamp) AS Week,
    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 = 'Moonwell'
    group by
    1,2



    Last run: 25 days ago
    WEEK
    TOKEN
    VOLUME
    1
    2025-01-06 00:00:00.000cbBTC221784312.97
    2
    2024-12-23 00:00:00.000cbBTC128463447.56
    3
    2024-12-16 00:00:00.000AERO3323010366.95
    4
    2023-10-16 00:00:00.000WETH632124.63
    5
    2024-07-08 00:00:00.000cbETH29644.98
    6
    2024-07-15 00:00:00.000WETH8559696.04
    7
    2024-12-23 00:00:00.000EURC23118328.48
    8
    2024-09-16 00:00:00.000AERO23160485.28
    9
    2023-12-25 00:00:00.000rETH44892.95
    10
    2024-12-09 00:00:00.000cbETH1269780.42
    11
    2023-10-02 00:00:00.000cbETH42213.39
    12
    2023-11-06 00:00:00.000USDC1437537.27
    13
    2024-08-19 00:00:00.000DAI174460.17
    14
    2024-08-19 00:00:00.000AERO41171449.21
    15
    2024-06-10 00:00:00.000AERO4909029.44
    16
    2024-08-12 00:00:00.000USDC91935882.29
    17
    2024-08-12 00:00:00.000rETH1837.53
    18
    2025-01-13 00:00:00.000AERO1746707041.32
    19
    2024-10-28 00:00:00.000cbBTC621442724.6
    20
    2024-09-30 00:00:00.000EURC9506361.14
    ...
    586
    26KB
    3s