Afonso_Diaz2023-05-06 09:37 PM
Updated 2023-05-06
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
t0 as (
select tx_receiver as validator
from near.core.fact_transactions
where tx_receiver ilike any ('%.poolv1.near', '%.pool.near')
group by 1
having count(distinct tx_hash) > 10
),
t as (
select
tx_hash,
'Stake' as action,
block_timestamp,
tx_signer as user,
tx:actions[0]:FunctionCall:deposit/1e24 amount_near
from near.core.fact_transactions
where tx_hash in (
select distinct tx_hash
from near.core.fact_actions_events_function_call
where method_name in ('deposit_and_stake', 'stake', 'stake_all')
)
and tx_receiver in (select distinct validator from t0)
),
t2 as (
select
user,
min(block_timestamp) as min_date
from t
group by 1
),
t3 as (
select
date_trunc('month', min_date)::date as month,
Run a query to Download Data