ThatGuyOptimism - User Behavior 6. eth tx p user
Updated 2022-10-26Copy 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
opt as (
SELECT
FROM_ADDRESS as wallet,
COUNT(DISTINCT tx_hash) as tx_count,
SUM(TX_FEE) as fees
FROM ethereum.core.fact_transactions
WHERE
STATUS = 'SUCCESS' AND block_timestamp::date >= '2021-11-11'
GROUP BY 1
ORDER BY 1
)
,
eth as (
SELECT
FROM_ADDRESS as wallet,
COUNT(DISTINCT tx_hash) as tx_count,
SUM(TX_FEE) as fees
FROM ethereum.core.fact_transactions
WHERE
STATUS = 'SUCCESS' AND block_timestamp::date >= '2021-11-11'
GROUP BY 1
ORDER BY 1
)
SELECT
CASE
WHEN tx_count = 1 THEN 'Single Transaction'
WHEN tx_count > 1 and tx_count < 5 THEN '1-5 Transactions'
WHEN tx_count >= 5 and tx_count < 10 THEN '5-10 Transactions'
WHEN tx_count >= 10 and tx_count < 25 THEN '10-25 Transactions'
WHEN tx_count >= 25 and tx_count < 50 THEN '25-50 Transactions'
WHEN tx_count >= 50 and tx_count < 100 THEN '50-100 Transactions'
WHEN tx_count >= 100 and tx_count < 250 THEN '100-250 Transactions'
WHEN tx_count >= 250 and tx_count < 500 THEN '250-500 Transactions'
WHEN tx_count >= 500 THEN 'More than 500 Transactions'
Run a query to Download Data