ben-wyattethereum copy
Updated 2025-02-03
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
›
⌄
-- forked from ethereum @ https://flipsidecrypto.xyz/studio/queries/6ed3c699-c3a5-46f9-ab50-53181a3e1e66
-- forked from unit-query @ https://flipsidecrypto.xyz/studio/queries/54460826-0a26-461a-b81d-22a6d8da4cb8
--this combines the ez_native_transfer and the ez_token_transfer tables together
--grabs the amount_usd values and does a little bit of by-row analysis
SELECT
DATE_TRUNC('month', block_timestamp) AS rounded_month,
COUNT(DISTINCT from_address) AS unique_users,
SUM(amount_usd) AS tx_vol_usd,
COUNT(*) AS tx_count,
CASE
WHEN amount_usd > 100000 THEN 'Large'
ELSE 'Small'
END AS transaction_size
FROM (
-- SELECT
-- block_timestamp,
-- from_address,
-- amount_usd
-- FROM ethereum.core.ez_token_transfers
-- WHERE block_timestamp BETWEEN '2022-01-01' AND '2024-12-31'
-- UNION ALL
SELECT
block_timestamp,
from_address,
amount_usd,
FROM ethereum.core.ez_native_transfers
WHERE block_timestamp BETWEEN '2022-01-01' AND '2024-12-31'
) AS combined_transfers
where amount_usd < 1e9
GROUP BY
QueryRunArchived: QueryRun has been archived