mohammadh2)Transactions by Protocol
Updated 2022-07-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
›
⌄
with A as (select count(a.TX_ID) as tx_count,b.TX_TYPE_NAME,
date_trunc('day',a.block_timestamp) as block_day,
case
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'
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 'Algo_dex'
end as PLATFORM
from flipside_prod_db.algorand.application_call_transaction a
join flipside_prod_db.algorand.transactions b
on a.TX_ID = b.TX_ID
where a.block_timestamp >= '2022-01-01'
and PLATFORM is not null
group by 2,3,4
order by tx_count desc),
B as (select avg(PRICE_USD) as algo_price,date_trunc('day',BLOCK_HOUR) as block_day
from flipside_prod_db.algorand.prices_swap
where ASSET_ID = 0
and BLOCK_HOUR >= '2022-01-01'
group by block_day
order by block_day desc)
select A.tx_count ,A.TX_TYPE_NAME ,B.block_day,A.PLATFORM ,B.algo_price from A join B on A.block_day=B.block_day
Run a query to Download Data