Papasotpact.fi LPs daily mints (gomint,goBTC,goETH)
    Updated 2023-01-03
    With pact_app_ids as
    ( SELECT DISTINCT tx_message :txn :apid :: NUMBER AS app_id
    FROM algorand.transactions
    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
    date_trunc('day',block_timestamp) as block_day,
    case
    when app_id = 661744776 then 'Algo/goBTC LP'
    when app_id = 645869114 then 'Algo/goETH LP'
    when app_id = 682482359 then 'Algo/goMint LP'
    else 'Other Pact.fi LPs'end as pool,
    count(tx_message) as LP_actions
    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 block_day, pool
    order by block_day

    Run a query to Download Data