0-MIDDaily Metrics by token type
Updated 2025-02-18
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
32
33
34
35
36
›
⌄
with tab1 as (
select
FROM_ADDRESS
,TO_ADDRESS
,TOKEN_ID
,NAME
,TX_HASH
from ronin.nft.ez_nft_transfers
where ORIGIN_TO_ADDRESS='0xfff9ce5f71ca6178d3beecedb61e7eff1602950e'
),
tab2 as (
select BLOCK_TIMESTAMP::date as day
,AMOUNT_USD
,ORIGIN_FROM_ADDRESS
,TX_HASH
from ronin.core.ez_token_transfers
where ORIGIN_FROM_ADDRESS=FROM_ADDRESS
and BLOCK_TIMESTAMP::date>='2025-01-01'
)
select day
,NAME
,sum(AMOUNT_USD)as volume
,count(distinct FROM_ADDRESS) as sellers
,count(distinct ORIGIN_FROM_ADDRESS) as buyers
,count(distinct TOKEN_ID) as traded_tokens
,count(distinct tab2.TX_HASH) as trades
from tab1
left join tab2
on tab1.TX_HASH=tab2.TX_HASH
and tab1.TO_ADDRESS=tab2.ORIGIN_FROM_ADDRESS
where day is not null
group by 1,2
order by 3
QueryRunArchived: QueryRun has been archived