KaskoazulUsers df (social, signed, received)
Updated 2023-01-21
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 first_social_txs AS (
SELECT
tx_signer AS user_name
, MIN(block_timestamp) AS first_social_tx
FROM
near.core.fact_transactions
WHERE
tx_receiver = 'social.near'
GROUP BY
user_name
)
, users_signed_txs AS (
SELECT
ft.*
FROM
near.core.fact_transactions ft
RIGHT JOIN
first_social_txs fst
ON
ft.tx_signer = fst.user_name
WHERE
tx_status = 'Success'
)
, user_signed_txs_stats AS (
SELECT
nt.tx_signer AS user_name
, MIN(nt.block_timestamp) AS first_signed_bc_tx
, COUNT(DISTINCT nt.tx_hash) AS signed_txs
--, SUM(nt.transaction_fee / POW(10,24)) AS total_near_fees
FROM
users_signed_txs nt
GROUP BY
user_name
)
Run a query to Download Data