SocioAnalyticasupply breakdown by token
    Updated 2025-01-24
    with supply as (
    SELECT
    token_symbol,
    sum(amount_usd) as amount_supply_usd
    FROM bsc.defi.ez_lending_deposits
    WHERE platform = 'Kinza'
    GROUP BY 1
    )

    , withdraw as (
    SELECT
    token_symbol,
    sum(amount_usd) as amount_withdraw_usd
    FROM bsc.defi.ez_lending_withdraws
    WHERE platform = 'Kinza'
    GROUP BY 1
    )



    SELECT
    a.token_symbol,
    coalesce(amount_supply_usd,0) - coalesce(amount_withdraw_usd,0) as current_supply
    FROM supply a
    LEFT JOIN withdraw b using(token_symbol)



    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived