chainlabsCEXs Netflow copy
Updated 2024-07-24Copy Reference Fork
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
›
⌄
-- forked from m4ri4ncocho / CEXs Netflow @ https://flipsidecrypto.xyz/m4ri4ncocho/q/pdg-zRAduoaV/cexs-netflow
-- BITCOIN DAILY NETFLOW
-- INPUTS
with inputs as (
select
date_trunc('day',block_timestamp) as date,
pubkey_script_address as address,
sum(value) as outflow
from bitcoin.core.fact_inputs
where date between '2023-04-01' and '2024-03-31'
group by date, address
),
-- OUTPUTS
outputs as (
select
date_trunc('day', block_timestamp) as date,
pubkey_script_address as address,
sum(value) as inflow
from bitcoin.core.fact_outputs
where date between '2023-04-01' and '2024-03-31'
group by date, address
),
-- INPUTS+OUTPUTS
merged as (
SELECT
date,
address,
-outflow as netflow
Auto-refreshes every 24 hours
QueryRunArchived: QueryRun has been archived