damidezborrow distribution of tx
    Updated 2025-03-24
    WITH tx_counts AS (
    SELECT
    Borrower,
    COUNT(*) AS total_tx
    FROM avalanche.defi.ez_lending_borrows
    WHERE contract_address = '0x794a61358d6845594f94dc1db02a252b5b4814ad'
    AND origin_to_address = '0x794a61358d6845594f94dc1db02a252b5b4814ad'
    AND token_symbol IN ('USDC', 'AUSD', 'USDt', 'DAI.e', 'FRAX')
    AND platform = 'Aave V3'
    AND event_name = 'Borrow'
    AND block_timestamp >= '2024-01-01'
    GROUP BY Borrower
    )
    SELECT
    CASE
    WHEN total_tx = 1 THEN '1 Transaction'
    WHEN total_tx BETWEEN 2 AND 5 THEN '2-5 Transactions'
    WHEN total_tx BETWEEN 6 AND 10 THEN '6-10 Transactions'
    WHEN total_tx BETWEEN 11 AND 20 THEN '11-20 Transactions'
    ELSE '20+ Transactions'
    END AS transaction_bucket,
    COUNT(*) AS depositor_count
    FROM tx_counts
    GROUP BY 1
    ORDER BY 2 DESC;


    Last run: 11 days ago
    TRANSACTION_BUCKET
    DEPOSITOR_COUNT
    1
    1 Transaction4901
    2
    2-5 Transactions3466
    3
    6-10 Transactions1273
    4
    11-20 Transactions756
    5
    20+ Transactions693
    5
    129B
    1s