alessio9567$FI: New Users
Updated 2024-11-29
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
›
⌄
WITH all_addresses AS (
-- Union all addresses from Ethereum and Binance
SELECT 'ethereum' as chain,
to_address,
DATE_TRUNC('month', block_timestamp)::date AS Month,
symbol
FROM
ethereum.core.ez_token_transfers
WHERE
(block_timestamp::date BETWEEN '2023-01-01' AND '2024-12-31' AND contract_address = LOWER('0x1294f4183763743c7c9519Bec51773fb3aCD78FD'))
UNION ALL
SELECT 'binance' as chain,
to_address,
DATE_TRUNC('month', block_timestamp)::date AS Month,
symbol
FROM
bsc.core.ez_token_transfers
WHERE
(block_timestamp >= '2023-01-01' AND contract_address = LOWER('0x1294f4183763743c7c9519Bec51773fb3aCD78FD'))
),
first_seen_addresses AS (
-- Find the first month each address appears
SELECT
to_address,
MIN(Month) AS first_seen_month
FROM
all_addresses
GROUP BY
to_address
)
-- Count the addresses that are first seen in each month
SELECT chain,
first_seen_month AS Month,
QueryRunArchived: QueryRun has been archived