Abbas_ra21Daily 1
    Updated 2025-02-03
    -- forked from Daily 1 @ https://flipsidecrypto.xyz/edit/queries/500a4b4b-f96c-4978-b6f6-208a06850a7d

    select
    date_trunc('Week',block_timestamp) AS Week,
    'Deposit' AS "Event Name",
    count(*) AS "Events Count",
    count(DISTINCT DEPOSITOR) AS "Users Count"
    from
    base.defi.ez_lending_deposits
    where
    PLATFORM = 'Moonwell'
    group by 1
    union ALL
    select
    date_trunc('Week',block_timestamp) AS Week,
    'Borrow' AS "Event Name",
    count(*) AS "Events Count",
    count(DISTINCT BORROWER) AS "Users Count"
    from
    base.defi.ez_lending_borrows
    where
    PLATFORM = 'Moonwell'
    group by 1
    union ALL
    select
    date_trunc('Week',block_timestamp) AS Week,
    'Flashloan' AS "Event Name",
    count(*) AS "Events Count",
    count(DISTINCT INITIATOR) AS "Users Count"
    from
    base.defi.ez_lending_flashloans
    where
    PLATFORM = 'Moonwell'
    group by 1
    union ALL
    select
    Last run: 25 days ago
    WEEK
    Event Name
    Events Count
    Users Count
    1
    2024-01-15 00:00:00.000Deposit4876769
    2
    2024-01-15 00:00:00.000Borrow769458
    3
    2024-01-15 00:00:00.000Liquidation33
    4
    2024-01-15 00:00:00.000Repayment707286
    5
    2024-01-15 00:00:00.000Withdraw39362110
    6
    2023-10-30 00:00:00.000Deposit3175318
    7
    2023-10-30 00:00:00.000Borrow710422
    8
    2023-10-30 00:00:00.000Liquidation22
    9
    2023-10-30 00:00:00.000Repayment524181
    10
    2023-10-30 00:00:00.000Withdraw27821263
    11
    2024-11-25 00:00:00.000Deposit182042182
    12
    2024-02-05 00:00:00.000Deposit53091572
    13
    2024-11-25 00:00:00.000Borrow96122192
    14
    2024-02-05 00:00:00.000Borrow557272
    15
    2024-11-25 00:00:00.000Liquidation183120
    16
    2024-02-05 00:00:00.000Liquidation22
    17
    2024-11-25 00:00:00.000Repayment147881785
    18
    2024-02-05 00:00:00.000Repayment514152
    19
    2024-11-25 00:00:00.000Withdraw124695261
    20
    2024-02-05 00:00:00.000Withdraw47762832
    ...
    389
    18KB
    5s