SocioCryptoAverage hours between two transactions no bots
Updated 2022-07-19
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 payers as (SELECT *,
rank()over(partition by payer ORDER BY block_timestamp) as rank
FROM flow.core.fact_transactions
WHERE payer IN (
SELECT DISTINCT trader
FROM
(
SELECT trader,
date_trunc('hour',block_timestamp) as hours,
count(tx_id) as n_swaps
FROM flow.core.fact_swaps
GROUP BY trader,hours
)
WHERE n_swaps >= 30
)
),
signers as (
SELECT f.value as wallet, p.*,
rank()over(signers by wallet ORDER BY p.block_timestamp) as rank
FROM solana.core.fact_transactions p,
table(flatten( p.signers)) f
WHERE wallet IN (
SELECT DISTINCT swapper
FROM
(
SELECT swapper,
date_trunc('hour',block_timestamp) as hours,
count(tx_id) as n_swaps
FROM solana.core.fact_swaps
GROUP BY swapper,hours
)
WHERE n_swaps >= 30
)
)
SELECT x.date,
Run a query to Download Data