mo115NEAR stablecoin swaps - Top
Updated 2024-08-23
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
26
27
28
29
30
31
›
⌄
with txs as ((select
TX_HASH
, TRADER
, ((AMOUNT_OUT)-(AMOUNT_IN)) as diff
, date_trunc('day', BLOCK_TIMESTAMP)as Date
, '-' as type
from near.defi.ez_dex_swaps
where SYMBOL_OUT in ('USDt' , 'USDT.e' ,'USDC' ,'USDC.e')
and SYMBOL_IN in ('USDt' , 'USDT.e' ,'USDC' ,'USDC.e')
order by 3
limit 100)
UNION all
(select
TX_HASH
, TRADER
, ((AMOUNT_OUT)-(AMOUNT_IN)) as diff
, date_trunc('day', BLOCK_TIMESTAMP)as Date
, '+' as type
from near.defi.ez_dex_swaps
where SYMBOL_OUT in ('USDt' , 'USDT.e' ,'USDC' ,'USDC.e')
and SYMBOL_IN in ('USDt' , 'USDT.e' ,'USDC' ,'USDC.e')
order by 3 desc
limit 100))
select Date , count (distinct TX_HASH) as txs, sum (diff) as tot_diff, type
from txs
group by 1,4
order by txs DESC
QueryRunArchived: QueryRun has been archived