Abbas_ra21Borrows Table
    Updated 2025-02-03
    -- forked from Borrows Table @ https://flipsidecrypto.xyz/edit/queries/0e60ae35-9afe-41a3-8b46-37b7cb582ccc

    with prices AS (
    select
    SYMBOL,
    PRICE,
    rank() over (
    partition by SYMBOL
    order by
    HOUR desc
    ) AS rank
    from
    base.price.ez_prices_hourly
    where
    TOKEN_ADDRESS in (
    select
    DISTINCT TOKEN_ADDRESS
    from
    base.defi.ez_lending_borrows
    ) qualify rank = 1
    ),
    main AS (
    select
    SYMBOL,
    sum(AMT) AS "Active Borrowed Amount"
    from
    (
    select
    TOKEN_SYMBOL AS SYMBOL,
    sum(AMOUNT) AS AMT
    from
    base.defi.ez_lending_borrows
    where
    PLATFORM = 'Moonwell'
    group by
    1
    Last run: 2 months ago
    SYMBOL
    Active Borrowed Amount
    Active Borrowed Amount ($)
    1
    DAI-66809.88879285-66876.698681643
    2
    wstETH176.790564081438969.202708454
    3
    AERO381224.473110199288181.303305031
    4
    cbBTC47.848455044466461.8841634
    5
    USDbC-87339.466422006-87339.466422006
    6
    weETH.base64.644196729160510.894037342
    7
    cbETH264.463548467656660.346207172
    8
    USDC45414505.036157445413415.0880365
    9
    WETH33966.95595541584339611.967736
    10
    WELL16044577.4663597457733.343851157
    11
    rETH62.713260468155716.398609227
    12
    EURC6197485.152056996340027.3105543
    12
    503B
    4s