mogarchyUntitled Query
Updated 2022-06-17
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with base as (select a.block_timestamp,
a.tx_id,
case
when split_part(memo, ':', 5) = 'thor160yye65pf9rzwrgqmtgav69n6zlsyfpgm9a7xk' then 'Accumulated Fee'
else 'Missed Fee'
end as categories,
max(to_amount_usd) as swap_volume
from flipside_prod_db.thorchain.swaps a
join flipside_prod_db.thorchain.swap_events b
on a.tx_id = b.tx_id
where right(split_part(memo, ':', 4),3) = '111'
and to_amount_usd > 100
--and affiliate_address = 'thor160yye65pf9rzwrgqmtgav69n6zlsyfpgm9a7xk'
group by 1,2,3)
select categories,
count(distinct(tx_id)) as count_tx
from base
where block_timestamp >= '2022-04-24'
group by 1
Run a query to Download Data