MLDZMNnftliq1
Updated 2023-09-02
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
›
⌄
-- forked from dexliq1 @ https://flipsidecrypto.xyz/edit/queries/115fa34d-5bc7-4fc4-b950-206b2a5767df
with t1 as (select
*
from avalanche.core.dim_labels
)
select
date_trunc('{{Time_basis}}', BLOCK_TIMESTAMP) as date,
PROJECT_NAME,
sum(amount_usd) as volume
from avalanche.core.ez_avax_transfers s
left join t1 on s.avax_to_address=t1.ADDRESS
where BLOCK_TIMESTAMP>=current_date-{{Period}}
and PROJECT_NAME is not null
and LABEL_TYPE in ('nft')
and label_subtype not in ('token_contract')
group by 1,2
union all
select
date_trunc('{{Time_basis}}', BLOCK_TIMESTAMP) as date,
PROJECT_NAME,
sum(amount_usd) as volume
from avalanche.core.ez_token_transfers s
left join t1 on s.TO_ADDRESS=t1.ADDRESS
where BLOCK_TIMESTAMP>=current_date-{{Period}}
and PROJECT_NAME is not null
and LABEL_TYPE in ('nft')
and label_subtype not in ('token_contract')
group by 1,2
Run a query to Download Data