Updated 2025-01-20
    SELECT
    DATE_TRUNC('month', block_timestamp) AS "Month",
    COUNT(DISTINCT sender_id) AS "Depositor",
    COUNT(DISTINCT tx_hash) AS "Total Deposit Transactions",
    SUM(amount_usd) AS "Total Deposited Volume",
    AVG(amount_usd) AS "Avg Deposited Amount"
    FROM
    near.defi.ez_lending
    WHERE
    symbol IN (
    'USDT',
    'USDt',
    'DAI',
    'FRAX',
    'USDT.e',
    'USDC.e',
    'USN'
    )
    AND actions IN ('deposit', 'deposit_to_reserve')
    GROUP BY
    DATE_TRUNC('month', block_timestamp)
    ORDER BY
    "Month";
    QueryRunArchived: QueryRun has been archived