NakedCollector2024-05-15 03:25 PM
Updated 2024-05-15
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 eth_gross AS (
SELECT
DATE_TRUNC('day', block_timestamp) AS day_,
SUM(tx_fee) AS eth_gross,
SUM(VALUE_PRECISE) AS total_VALUE_PRECISE
FROM
arbitrum.core.fact_transactions
WHERE
block_timestamp >= '2023-06-01'
GROUP BY
day_
),
eth_paid AS (
SELECT
DATE_TRUNC('day', block_timestamp) AS day_,
SUM(tx_fee) AS eth_paid
FROM
ethereum.core.fact_transactions
WHERE
block_timestamp >= '2023-06-01'
AND from_address IN (
lower('0xC1b634853Cb333D3aD8663715b08f41A3Aec47cc')
)
GROUP BY
day_
),
arbitrum_data AS (
SELECT
a.day_,
a.eth_gross,
a.eth_paid,
a.eth_gross - a.eth_paid AS eth_revenue,
a.total_VALUE_PRECISE
FROM
eth_gross a
FULL JOIN
QueryRunArchived: QueryRun has been archived