goanji6455a brief classification
Updated 2022-05-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
with temp as (SELECT BLOCK_TIMESTAMP::date as date,
count(DISTINCT TX_GROUP_ID) as tx_counts,
case
when SWAP_FROM_ASSET_ID=386195940 then 'goETH >>> whatever'
when SWAP_FROM_ASSET_ID=386192725 then 'goBTC >>> whatever'
when SWAP_to_ASSET_ID=386195940 then 'whatever >>> goETH'
when SWAP_to_ASSET_ID=386192725 then 'whatever >>> goBTC'
end as swap_type
from flipside_prod_db.algorand.swaps
where BLOCK_TIMESTAMP::date >= '2022-04-01'
and (SWAP_FROM_ASSET_ID in (386192725,386195940) or SWAP_to_ASSET_ID in (386192725,386195940))
GROUP by 1 ,3)
select SWAP_TYPE class, sum(TX_COUNTS) as number_of_swaps from temp group by 1 order by 2 desc
Run a query to Download Data