FlorentGLP actions
    Updated 2024-01-19
    WITH deposit_lp as (
    SELECT
    date_trunc('day', BLOCK_TIMESTAMP) as day,
    sum(event_data ['deposit_amount']) / 1000000 as lp_deposit
    FROM
    aptos.core.fact_events
    WHERE
    event_type = '0x5ae6789dd2fec1a9ec9cccfb3acaf12e93d432f0a3a42c92fe1a9d490b7bbc06::house_lp::DepositEvent'
    AND BLOCK_TIMESTAMP :: DATE >= '2023-10-01'
    GROUP BY
    1
    ),
    withdraw_lp as (
    SELECT
    date_trunc('day', BLOCK_TIMESTAMP) as day,
    sum(event_data ['withdraw_amount']) / 1000000 as lp_withdraw
    FROM
    aptos.core.fact_events
    WHERE
    event_type = '0x5ae6789dd2fec1a9ec9cccfb3acaf12e93d432f0a3a42c92fe1a9d490b7bbc06::house_lp::WithdrawEvent'
    AND BLOCK_TIMESTAMP :: DATE >= '2023-10-01'
    GROUP BY
    1
    )

    SELECT
    i.day,
    lp_deposit,
    lp_withdraw
    FROM
    deposit_lp as i JOIN withdraw_lp w ON i.day = w.day
    ORDER BY 1 desc

    SELECT
    TX_HASH,
    date_trunc('day', BLOCK_TIMESTAMP) as day,
    QueryRunArchived: QueryRun has been archived