nitsUntitled Query
    Updated 2022-05-02
    With pact_app_ids as
    ( SELECT DISTINCT tx_message:txn:apid AS app_id FROM algorand.application_call_transaction
    WHERE inner_tx = 'FALSE' AND tx_message :dt :itx [0] :txn :type :: STRING = 'acfg'
    AND tx_message :dt :itx [0] :txn :apar :an :: STRING LIKE '%PACT LP Token'
    AND tx_message :dt :itx [0] :txn :apar :au :: STRING = 'https://pact.fi/' )
    SELECT app_id, xyz, count(*) as total_txs from
    (select ( TRY_BASE64_DECODE_STRING(tx_message:txn:apaa[0]::STRING)) as xyz ,*
    from algorand.application_call_transaction
    where app_id IN
    ( SELECT app_id FROM pact_app_ids )
    and ( TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = 'ADDLIQ' OR TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = 'REMLIQ'))
    GROUP by 1,2
    -- limit 100
    -- And
    -- -To decode filter with: TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = ‘ADDLIQ’ OR TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = ‘REMLIQ’

    Run a query to Download Data