tomingRetention copy
    -- forked from Abbas_ra21 / Retention @ https://flipsidecrypto.xyz/Abbas_ra21/q/4kv5DwCdPzyQ/retention

    -- forked from Total Users @ https://flipsidecrypto.xyz/edit/queries/3352b4a6-ce17-43aa-84ce-ef11460a2cb4

    with main AS (select
    BLOCK_TIMESTAMP,
    'Deposit' AS "Event Name",
    DEPOSITOR AS user
    from
    base.defi.ez_lending_deposits
    where
    PLATFORM = 'Seamless'
    union ALL
    select
    BLOCK_TIMESTAMP,
    'Borrow' AS "Event Name",
    BORROWER AS user
    from
    base.defi.ez_lending_borrows
    where
    PLATFORM = 'Seamless'
    union ALL
    select
    BLOCK_TIMESTAMP,
    'Flashloan' AS "Event Name",
    INITIATOR AS user
    from
    base.defi.ez_lending_flashloans
    where
    PLATFORM = 'Seamless'
    union ALL
    select
    BLOCK_TIMESTAMP,
    'Liquidation' AS "Event Name",
    BORROWER AS user
    from
    Run a query to Download Data