AVG_AGE_WALLETS | |
---|---|
1 | 67.237627 |
elsina2025-02-25: Avg Age wallet
Updated 2025-02-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
›
⌄
WITH base AS (
SELECT
block_timestamp,
origin_from_address,
tx_hash,
pool_name,
CASE
WHEN amount_in_usd IS NOT NULL AND amount_out_usd IS NOT NULL
THEN (amount_in_usd + amount_out_usd) / 2
ELSE COALESCE(amount_in_usd, amount_out_usd)
END AS amount
FROM avalanche.defi.ez_dex_swaps
WHERE
platform = 'pangolin'
AND (amount_in_usd IS NOT NULL OR amount_out_usd IS NOT NULL)
),
t1 AS (
SELECT
origin_from_address AS user,
MIN(block_timestamp) AS min_platform_tx
FROM base
GROUP BY origin_from_address
),
t2 AS (
SELECT
a.user,
a.min_platform_tx,
MIN(b.block_timestamp) AS min_tx
FROM t1 a
LEFT JOIN avalanche.core.fact_transactions b
ON a.user = b.from_address
GROUP BY a.user, a.min_platform_tx
),
Last run: about 2 months ago
1
13B
23s