chainlabsDaily Active Addresses copy
Updated 2024-07-07
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 / Daily Active Addresses @ https://flipsidecrypto.xyz/m4ri4ncocho/q/JexAxPKdvBUz/daily-active-addresses
--ACTIVE ADDRESSES
--TOTAL INPUTS+OUTPUTS
with inputs_outputs as (
SELECT
date_trunc('day', block_timestamp) as date,
PUBKEY_SCRIPT_ADDRESS as address
from bitcoin.core.fact_inputs
where date between '2023-04-01' and '2024-03-31'
union all
SELECT
date_trunc('day', block_timestamp) as date,
PUBKEY_SCRIPT_ADDRESS as address
from bitcoin.core.fact_outputs
where date between '2023-04-01' and '2024-03-31'
),
--IMPORT LABELS FROM CHAINLABS
--Kraken
kraken_labels_1 as (
SELECT DISTINCT
f.value:address::string as address,
'Kraken' as entity
from (
SELECT
parse_json(livequery.live.udf_api('https://ipfs.io/ipfs/QmTtEW2hesBmXvQYXtVMaWsbZ35tHgbkLgRvv6yVfMKKmP')) as response
),
lateral flatten(input => response:data) as f
),
kraken_labels_2 as (
QueryRunArchived: QueryRun has been archived