check_skedSolana User Data
Updated 2023-12-27Copy Reference Fork
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
›
⌄
WITH query1 AS (
SELECT
DATE_TRUNC('day', ft.block_timestamp) AS dt,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'dex' THEN ft.tx_from
END
) AS dex_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'defi' THEN ft.tx_from
END
) AS defi_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'dapp' THEN ft.tx_from
END
) AS dapp_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'nft' THEN ft.tx_from
END
) AS nft_count,
COUNT(
DISTINCT CASE
WHEN dl.label_type = 'layer2' THEN ft.tx_from
END
) AS layer2_count
FROM
solana.core.fact_transfers ft
JOIN solana.core.dim_labels dl ON ft.tx_to = dl.address
WHERE
ft.block_timestamp >= '2022-12-01'
AND dl.label_type IN ('dex', 'defi', 'dapp', 'nft', 'layer2')
GROUP BY
DATE_TRUNC('day', ft.block_timestamp)
QueryRunArchived: QueryRun has been archived