zakkisyedAlgorand type of transactions
    Updated 2022-07-13
    with t1 as
    (
    select
    BLOCK_TIMESTAMP::DATE AS DATE,
    tx_id AS Transactions,
    Case
    when app_id in ('705663269','705657303','674527132','661247364','661207804','661204747','661199805','661193019','661192413','659678644','659677335','658337046','658336870','647785804','647785158','641500474','641499935','639747739','639747119','611869320','553866305','482625868','465814222','465814065','674526408','637795072','637793356','635866213','635864509','635863793','635860537','635813909','635812850','611867642','611804624','611801333','605753404','553869413','482608867','465818260','465814318','465814278','465814149','465814103') then 'AlgoFi'
    when app_id in ('354073718','354073834') then 'algodex'
    when app_id in ('776179559','776176449','752770929','751285119','747239433','747237154','743685742','743679535','696044550','694464549','694405065','686876641','686875498','686862190','686860954','686501760','686500844','686500029','686498781') then 'folks finance'
    when app_id in ('649588853','350338509','552635992') then 'tinyman'
    else 'others'
    end as protocol
    --sum(fee) as fees
    from flipside_prod_db.algorand.application_call_transaction
    --ORDER BY 1 DESC
    )

    select count(t1.transactions) as tx_count, sum(t2.fee), t1.protocol, t2.tx_type_name

    from t1
    inner join flipside_prod_db.algorand.transactions as t2
    on t1.transactions= t2.tx_id

    group by 3,4
    order by 1 desc
    Run a query to Download Data