ML610
Updated 2024-04-09
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
›
⌄
with btc_prehalving as (
select
count(*) as number,
BLOCK_TIMESTAMP::date as days,
case when INPUT_VALUE >= 10 and INPUT_VALUE < 100 then 'between 10 To 100 BTC'
when INPUT_VALUE >= 100 and INPUT_VALUE < 1000 then 'between 100 To 1K BTC'
when INPUT_VALUE >= 1000 then 'more than 1K BTC' end as category
from
bitcoin.core.fact_transactions
where days > '2019-12-11' and days < '2020-8-11'
and INPUT_VALUE is not null and INPUT_VALUE >=10
group by 2,3)
,
btc_currenthalving as
(
select
count(*) as number,
BLOCK_TIMESTAMP::date as days,
case when INPUT_VALUE >= 10 and INPUT_VALUE < 100 then 'between 10 To 100 BTC'
when INPUT_VALUE >= 100 and INPUT_VALUE < 1000 then 'between 100 To 1K BTC'
when INPUT_VALUE >= 1000 then 'more than 1K BTC' end as category
from
bitcoin.core.fact_transactions
where days > '2023-11-01'
and INPUT_VALUE is not null and INPUT_VALUE >=10
group by 2,3)
select * from btc_currenthalving
QueryRunArchived: QueryRun has been archived