Updated 2023-08-30
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
›
⌄
WITH transactions AS (
SELECT
date_trunc('week', block_timestamp) AS date,
COUNT(DISTINCT tx_hash) AS tx_count,
COUNT(DISTINCT tx_hash) / (24 * 60 * 60) AS tx_per_second
FROM bitcoin.core.fact_transactions
GROUP BY 1
),
prices AS (
SELECT
date_trunc('day', HOUR) AS date,
AVG(price) AS price
FROM ethereum.core.fact_hourly_token_prices
WHERE symbol = 'WBTC'
GROUP BY 1
)
SELECT
t.date,
t.tx_count,
t.tx_per_second,
p.price
FROM transactions t
JOIN prices p ON t.date = p.date
ORDER BY 1
Run a query to Download Data