Flipside TeamFS near report - usdt supply
Updated 2024-07-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with usdt_issue as
(select BLOCK_TIMESTAMP, try_parse_json(CLEAN_LOG):event as event,
try_parse_json(CLEAN_LOG):data[0]:amount/1e6 as amount,
try_parse_json(CLEAN_LOG):data[0]:owner_id as owner_id,
TX_HASH, CLEAN_LOG
from near.core.fact_logs
where RECEIVER_ID='usdt.tether-token.near'
and try_parse_json(CLEAN_LOG):event in ('ft_mint', 'ft_burn'))
select *
from
(select date_trunc(month,BLOCK_TIMESTAMP) as "Date",
sum(case when event='ft_mint' then amount else 0 end) as "Mint",
sum(case when event='ft_burn' then -amount else 0 end) as "Burn",
"Mint"+"Burn" as net,
sum(net) over (order by "Date") as "Supply"
from usdt_issue
group by 1)
where "Date">='2023-12-01'
QueryRunArchived: QueryRun has been archived