pepperatzistats of users and transactions
Updated 2024-12-31
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 raw as
(SELECT
date_trunc('day', block_timestamp) as date,
tx_id,
flattened_data.index AS array_index, -- Alias to avoid ambiguity
flattened_data.value as user
FROM eclipse.core.fact_transactions,
LATERAL FLATTEN(input => signers) AS flattened_data;
),
base as(
SELECT
date,
tx_id,
user as address
from raw
where array_index = 0
),
semi as (
SELECT
count(distinct tx_id) as transactions,
address
FROM base
group by address
),
finished as (
SELECT
CASE
WHEN transactions = 1 THEN '1'
WHEN transactions BETWEEN 2 AND 5 THEN '1-5'
WHEN transactions BETWEEN 6 AND 10 THEN '>5-10'
WHEN transactions BETWEEN 11 AND 50 THEN '>10-50'
WHEN transactions BETWEEN 51 AND 100 THEN '>50-100'
ELSE '>100'
QueryRunArchived: QueryRun has been archived