SG data2024-06-04 11:38 AM
Updated 2024-06-20
999
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
tx_fees AS (
SELECT
'ethereum' AS dataset,
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS day,
tx_fee
FROM ethereum.core.fact_transactions
WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '3 YEAR'
UNION ALL
SELECT
'polygon' AS dataset,
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS day,
tx_fee
FROM polygon.core.fact_transactions
WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '3 YEAR'
UNION ALL
SELECT
'bsc' AS dataset,
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS day,
tx_fee
FROM bsc.core.fact_transactions
WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '3 YEAR'
UNION ALL
SELECT
'arbitrum' AS dataset,
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS day,
tx_fee
FROM arbitrum.core.fact_transactions
WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '3 YEAR'
UNION ALL
SELECT
'optimism' AS dataset,
DATE_TRUNC('day', BLOCK_TIMESTAMP) AS day,
tx_fee
FROM optimism.core.fact_transactions
WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '3 YEAR'
QueryRunArchived: QueryRun has been archived