saeedmznUntitled Query
    Updated 2022-05-23
    with FolkFinance as (
    select
    block_timestamp ::date as date ,
    case when app_id =686501760 then 'goBTC'
    when app_id = 694405065 then 'goETH'
    end as asset ,
    -- case when (TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING)) = 'd' then 'ADDLIQ'
    -- when (TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) )= 'r' then 'REMLIQ'
    -- end as type ,
    sum(asset_amount/1e6) as amount,
    count (tx_group_id) as num_transactions,
    count (DISTINCT sender ) as sender
    from flipside_prod_db.algorand.application_call_transaction join flipside_prod_db.algorand.asset_transfer_transaction using (tx_group_id)
    group by 1,2 having asset is not NULL
    -- and type is not NULL
    )
    select * from FolkFinance
    Run a query to Download Data