Flipside Team2012 CEXs
Updated 2024-04-18
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
-------------------- Dates --------------------
dates as (
select
date_day as date,
case
when date_day < '2012-11-28' then 'Pre-Halving'
when date_day = '2012-11-28' then 'Halving'
when date_day > '2012-11-28' then 'Post-Halving'
end as period
from
crosschain.core.dim_dates
where
date_day between ('2012-11-28'::date - 30) and ('2012-11-28'::date + 30)
),
-------------------- Raw Transfers --------------------
inputs as (
select
inputs.block_timestamp,
labels.address,
labels.label as cex,
inputs.value
from
bitcoin.core.fact_inputs inputs
join bitcoin.core.dim_labels labels on inputs.pubkey_script_address = labels.address
where
label_type = 'cex'
),
outputs as (
select
outputs.block_timestamp,
labels.address,
labels.label as cex,
outputs.value
from
bitcoin.core.fact_outputs outputs
QueryRunArchived: QueryRun has been archived