MLDZMNdex1
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 defi1 @ https://flipsidecrypto.xyz/edit/queries/e4b25d0a-b7fb-4b41-8751-398ddd5c9e06
-- forked from sc1 @ https://flipsidecrypto.xyz/edit/queries/e0eb256d-af72-4539-afe2-bdd0fbafb07c
-- forked from type_fee1 @ https://flipsidecrypto.xyz/edit/queries/cd81385a-bb07-44b3-925c-e394ba58c794
-- forked from lebel1 @ https://flipsidecrypto.xyz/edit/queries/9a89f6a3-52ec-4ce9-8e26-92ada10e93e6
with t1 as (select
*
from avalanche.core.dim_labels
)
select
PROJECT_NAME,
count(distinct tx_hash) as no_txn,
sum(TX_FEE) as total_fee,
avg(TX_FEE) as avg_fee,
median(TX_FEE) as median
from avalanche.core.fact_transactions s
left join t1 on s.TO_ADDRESS=t1.ADDRESS
where BLOCK_TIMESTAMP>=current_date-{{Period}}
and PROJECT_NAME is not null
and STATUS = 'SUCCESS'
and LABEL_TYPE in ('dex')
and label_subtype not in ('token_contract')
group by 1
order by 3 desc
Run a query to Download Data