fdgfdgfdfgbf2023-07-19 09:26 PM copy
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
›
⌄
-- forked from Mrfti / 2023-07-19 09:26 PM @ https://flipsidecrypto.xyz/Mrfti/q/KdQfY4fcsSTR/2023-07-19-09-26-pm
with
tbl1 AS (
SELECT
date_trunc(day, block_timestamp) as date1,
max(block_reward) as "Block Reward"
from
bitcoin.core.ez_miner_rewards
GROUP by
1
order by
1
),
tbl2 AS (
SELECT
hour as date2,
avg(price) as "Price"
from
ethereum.core.fact_hourly_token_prices
where
symbol = 'WBTC'
GROUP by
1
)
SELECT
date1,
"Block Reward",
"Price"
from
tbl1
full join tbl2 on date1 = date2
where
date1 between '2020-05-05 00:00:00.000' and 'curn'
order by
1 asc
Run a query to Download Data