SpecterSegmenting Users by Frequency of Deposits
Updated 2024-08-23
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 UserDeposits AS (
SELECT
'ethereum' AS chain,
from_address AS user,
COUNT(DISTINCT tx_hash) AS deposit_count
FROM ethereum.core.fact_transactions
WHERE to_address = '0xfdf7c22ca4704dfef46e7e5ef53dca1d5a9f8e12'
AND block_timestamp >= '2024-05-24'
AND status = 'SUCCESS'
GROUP BY user
UNION ALL
SELECT
'optimism' AS chain,
from_address AS user,
COUNT(DISTINCT tx_hash) AS deposit_count
FROM optimism.core.fact_transactions
WHERE to_address = '0xfdf7c22ca4704dfef46e7e5ef53dca1d5a9f8e12'
AND block_timestamp >= '2024-05-24'
AND status = 'SUCCESS'
GROUP BY user
UNION ALL
SELECT
'base' AS chain,
from_address AS user,
COUNT(DISTINCT tx_hash) AS deposit_count
FROM base.core.fact_transactions
WHERE to_address = '0xfdf7c22ca4704dfef46e7e5ef53dca1d5a9f8e12'
AND block_timestamp >= '2024-05-24'
AND status = 'SUCCESS'
GROUP BY user
UNION ALL
QueryRunArchived: QueryRun has been archived