zpokoAvalanche NFT
Updated 2023-07-03
999
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 Avalanche DEX @ https://flipsidecrypto.xyz/edit/queries/28326e78-472b-4759-88fb-717166ba3312
-- forked from Avalanche @ https://flipsidecrypto.xyz/edit/queries/60d7f5d4-6a8c-49cc-a6c9-be2082e3f45c
WITH
query1 AS (
SELECT
DATE_TRUNC('day', ft.block_timestamp) AS dt,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'dex' THEN ft.from_address
END
) AS dex_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'defi' THEN ft.from_address
END
) AS defi_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'dapp' THEN ft.from_address
END
) AS dapp_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'nft' THEN ft.from_address
END
) AS nft_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'layer2' THEN ft.from_address
END
) AS layer2_count
FROM
avalanche.core.fact_transactions ft
JOIN avalanche.core.dim_labels dl ON ft.to_address = dl.address
Run a query to Download Data