0xHaM-dDistribution of Users based on Avg Time between Txs
Updated 2024-10-05
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 hereW as (
select
BLOCK_TIMESTAMP,
case
when ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike 'tg'
or ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike '%.hot.tg'
or ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike '%.herewallet.near'
then 'Here Wallet' else 'Other' end as type,
TX_HASH,
ifnull(tx:actions[0]:Delegate:delegate_action:sender_id::string, TX_SIGNER) as user,
TRANSACTION_FEE/1e24 as fee
from near.core.fact_transactions
where TX_SUCCEEDED=true
and BLOCK_TIMESTAMP::date>='2023-10-01'
)
,
txs as (
SELECT DISTINCT
block_timestamp,
tx_hash,
user as TX_SIGNER
FROM hereW
WHERE type = 'Here Wallet'
)
,
txsGap AS (
SELECT
TX_SIGNER as User,
block_timestamp as Txs_date,
LAG(block_timestamp) OVER (
PARTITION BY User
ORDER BY
block_timestamp
) AS prev_Txs_date
FROM txs
),
QueryRunArchived: QueryRun has been archived