dethectiveWallet Age per token - Using swaps
Updated 2025-01-31
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 wallet_age as (
SELECT
swapper,
min(block_timestamp) as first_tx,
count(*) as tot_tx
from
solana.defi.ez_dex_swaps
where
swapper in (
SELECT
DISTINCT(swapper)
FROM
solana.defi.ez_dex_swaps
where
swap_to_mint = '{{token_address}}'
)
GROUP BY
swapper
),
token_age as (
SELECT
min(block_timestamp) as token_age
FROM
solana.defi.ez_dex_swaps
where
swap_to_mint = '{{token_address}}'
)
SELECT
wa.*,
(SELECT token_age FROM token_age) AS token_age,
DATEDIFF(hour, wa.first_tx, token_age) AS created_before_hours,
DATEDIFF(day, wa.first_tx, token_age) AS created_before_days
FROM
wallet_age wa;
QueryRunArchived: QueryRun has been archived