rajsNear
Updated 2022-09-03Copy Reference Fork
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 new_users as
(
SELECT
tx_signer as user,
min(block_timestamp) as date_joined
from near.core.fact_transactions
-- where tx_hash = '4EnjfJZjyrU5aiC4osF5xR8aZDAgyFt1n3Azjd4x39rL'
group by 1
)
,
first_txs as
(
SELECT
*
from near.core.fact_transactions t
inner join new_users n
on t.block_timestamp = date_joined
and tx_signer = user
)
,
req_tab as
(
SELECT
action_name,
count(*)
from near.core.fact_actions_events
-- where tx_hash = '4EnjfJZjyrU5aiC4osF5xR8aZDAgyFt1n3Azjd4x39rL'
where tx_hash IN
(
SELECT
tx_hash
from first_txs
)
group by 1
Run a query to Download Data