feyikemiMar1na codes
Updated 2024-05-05
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
›
⌄
with new_addresses AS
(SELECT
from_address,
min(block_timestamp) as first_tx_timestamp
FROM
arbitrum.core.fact_transactions
WHERE origin_function_signature <> '0x6bf6a42d'
GROUP by from_address
HAVING first_tx_timestamp >= '2023-03-01'
and first_tx_timestamp < '2024-03-01'
)
SELECT
date_trunc('week', first_tx_timestamp) as week,
'new' as type,
count(from_address) as n_addresses
FROM
new_addresses
GROUP BY week, type
UNION ALL
SELECT
date_trunc('week', block_timestamp) as week,
'all active' as type,
count(DISTINCT from_address) as n_addresses
FROM
arbitrum.core.fact_transactions
WHERE date_trunc('day', block_timestamp) >= '2023-03-01'
AND date_trunc('day', block_timestamp) <= '2024-03-01'
GROUP BY week
QueryRunArchived: QueryRun has been archived