dannyamahAptos Q1 Users
Updated 2024-04-26
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 Total Users @ https://flipsidecrypto.xyz/edit/queries/abd31678-6d40-462f-99a0-9cbce4a72576
WITH protocol AS (
SELECT
event_address AS Event_Address,
COUNT(DISTINCT tx_hash) AS Number_of_Transactions,
COUNT(DISTINCT account_address) AS Unique_Account_Addresses
FROM
aptos.core.fact_events
WHERE
block_timestamp >= '2024-01-01'
AND block_timestamp <= '2024-03-31'
GROUP BY 1
),
label AS (
SELECT
l.label AS Project_Name,
l.label_type AS Project_Type,
p.number_of_transactions AS Transaction_Number,
p.event_address AS Event_Address
FROM protocol AS p
JOIN aptos.core.dim_labels AS l
ON p.event_address = l.ADDRESS
),
event AS (
SELECT
SPLIT(PAYLOAD_FUNCTION, '::')[0] AS Event,
t.*
FROM
aptos.core.fact_transactions AS t
JOIN label
ON SPLIT(t.PAYLOAD_FUNCTION, '::')[0] = label.event_address
QueryRunArchived: QueryRun has been archived