pandaparty-pool_deposit/withdraw-party
    Updated 2024-06-29
    -- forked from party-pool_numUsers-numParty @ https://flipsidecrypto.xyz/edit/queries/fd89f7c8-914d-4478-8f75-ffd07f398a81

    WITH deposit_txs AS
    (
    SELECT
    VALUE:TX_ID::string as tx_id,
    VALUE:BLOCK_TIMESTAMP::timestamp as block_timestamp,
    VALUE:AMOUNT::float as amount,
    VALUE:TX_TO::string as tx_to,
    VALUE:USER_ADD::string as user_add,
    VALUE:MINT::string as mint
    from (
    select livequery.live.udf_api(
    'https://flipsidecrypto.xyz/api/v1/queries/7ea22837-bf4f-4890-9e76-6df27d1f4db3/data/latest'
    ) :data as data
    ) response
    inner join lateral flatten (input => response.data) f
    ),

    withdraw_txs AS
    (
    SELECT
    VALUE:TX_ID::string as tx_id,
    VALUE:BLOCK_TIMESTAMP::timestamp as block_timestamp,
    VALUE:AMOUNT::float as amount,
    VALUE:TX_TO::string as tx_to,
    VALUE:USER_ADD::string as user_add,
    VALUE:MINT::string as mint
    from (
    select livequery.live.udf_api(
    'https://flipsidecrypto.xyz/api/v1/queries/ecce1f6d-a426-4745-b3b3-5f713f1958cd/data/latest'
    ) :data as data
    ) response
    inner join lateral flatten (input => response.data) f
    )

    QueryRunArchived: QueryRun has been archived