Haisenbergblast-acquired-user2
Updated 2024-06-28
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 blast-acquired-user1 @ https://flipsidecrypto.xyz/edit/queries/bba2c5c0-52e5-4a48-b622-0023aba9ea54
with acq AS
(SELECT
from_address
FROM blast.core.fact_transactions
where nonce=1),
acq_user_base AS (
SELECT
date_trunc('{{time_range}}', block_timestamp) as date,
ac.from_address as sender,
label_type as sector
FROM blast.core.fact_transactions s
LEFT JOIN blast.core.dim_labels a on s.to_address = a.address
INNER JOIN acq ac ON ac.from_address=s.from_address
AND label_type NOT IN ('chadmin','token')
GROUP BY 1, 2, 3
HAVING sector IS NOT NULL
)
SELECT
date as "Date",
sector,
count(sender) as "Acquired users"
FROM acq_user_base
WHERE
date >= '{{Start_Date}}'
AND date <= '{{End_Date}}'
AND date <= current_date - 1
GROUP BY 1, 2
ORDER BY 2 DESC
QueryRunArchived: QueryRun has been archived