permarynew users
Updated 2025-03-17
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 historical_users AS (
-- Find all wallets that used XSGD on Ethereum or Polygon before September 2024
SELECT DISTINCT origin_from_address AS wallet_address
FROM ethereum.core.ez_token_transfers
WHERE contract_address = LOWER('0x70e8dE73cE538DA2bEEd35d14187F6959a8ecA96')
AND block_timestamp < '2024-09-01'
UNION
SELECT DISTINCT origin_to_address AS wallet_address
FROM ethereum.core.ez_token_transfers
WHERE contract_address = LOWER('0x70e8dE73cE538DA2bEEd35d14187F6959a8ecA96')
AND block_timestamp < '2024-09-01'
UNION
SELECT DISTINCT origin_from_address AS wallet_address
FROM polygon.core.ez_token_transfers
WHERE contract_address = LOWER('0xDC3326e71D45186F113a2F448984CA0e8D201995')
AND block_timestamp < '2024-09-01'
UNION
SELECT DISTINCT origin_to_address AS wallet_address
FROM polygon.core.ez_token_transfers
WHERE contract_address = LOWER('0xDC3326e71D45186F113a2F448984CA0e8D201995')
AND block_timestamp < '2024-09-01'
),
first_tx_per_chain AS (
-- Find first transaction per user on each chain (starting from September 2024)
SELECT
'Ethereum' AS chain,
origin_from_address AS wallet_address,
MIN(DATE_TRUNC('month', block_timestamp)) AS first_tx_month