bintuparisTotal withdrawals/dEPOSITS
    Updated 2024-11-08
    with deposit AS (SELECT
    ROUND (SUM(t.amount), 2) AS deposits
    FROM
    solana.core.fact_transfers AS t
    JOIN solana.core.fact_decoded_instructions AS I
    ON t.tx_id = i.tx_id
    WHERE
    MINT = '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo'
    AND TX_TO = '9DrvZvyWh1HuAoZxvYWMvkf2XCzryCpGgHqrMjyDWpmo'
    AND i.event_type = 'depositReserveLiquidityAndObligationCollateral'),

    withdrawals AS (SELECT
    ROUND (SUM(t.amount), 2) AS withdraws
    FROM
    solana.core.fact_transfers AS t
    JOIN solana.core.fact_decoded_instructions AS I
    ON t.tx_id = i.tx_id
    WHERE
    MINT = '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo'
    AND TX_from = '9DrvZvyWh1HuAoZxvYWMvkf2XCzryCpGgHqrMjyDWpmo'
    AND i.event_type = 'withdrawObligationCollateralAndRedeemReserveCollateral')

    SELECT deposits OVERALL_SUPPLIED, withdraws OVERALL_WITHDRAWED, deposits - withdraws AS CURRENT_SUPPLIED
    FROM deposit, WITHDRAWALS

    QueryRunArchived: QueryRun has been archived