Kruys-CollinsTop 20 Bonders by OLAS amount
    Updated 2024-12-30
    WITH bonding_summary AS (
    SELECT
    owner_address,
    SUM(olas_amount) AS total_olas_amount,
    COUNT(*) AS bonding_events_count,
    COUNT(DISTINCT lp_token_address) AS unique_lp_tokens,
    MAX(block_timestamp) AS last_bonding_event,
    SUM(CASE WHEN is_redeemed = FALSE THEN olas_amount ELSE 0 END) AS total_olas_not_redeemed
    FROM
    crosschain.olas.ez_olas_bonding
    GROUP BY
    owner_address
    )
    SELECT
    '👤' || owner_address as Bonders,
    total_olas_amount as "Total $OLAS Amount",
    bonding_events_count as "Number of Bonding Events",
    unique_lp_tokens as "LP Tokens Interacted with",
    last_bonding_event as "Last Seen",
    total_olas_not_redeemed as "Total $OLAS not yet redeemed"
    FROM
    bonding_summary
    ORDER BY
    2 DESC
    LIMIT 20;

    QueryRunArchived: QueryRun has been archived