theericstonemultichain summary stats eco
Updated 2024-05-16
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 multichain summary stats @ https://flipsidecrypto.xyz/edit/queries/0a336f01-1e6a-4833-bc39-3e0197c1c8f2
with avax as (
select 'AVAX' as symbol,
block_timestamp::date as date,
count(1) as n_txns,
count(distinct from_address) as n_active,
sum(value) as tx_volume
from avalanche.core.fact_transactions
where block_timestamp > current_date - {{daysago}}
group by 1,2
),
btc as (
select 'BTC' as symbol,
block_timestamp::date as date,
count(distinct tx_id) as n_txns,
count(distinct pubkey_script_address) as n_active,
sum(value) as tx_volume
from bitcoin.core.fact_outputs
where block_timestamp > current_date - {{daysago}}
group by 1,2
),
eth as (
select 'ETH' as symbol,
block_timestamp::date as date,
count(1) as n_txns,
count(distinct from_address) as n_active,
sum(value) as tx_volume
from ethereum.core.fact_transactions
where block_timestamp > current_date - {{daysago}}
group by 1,2
),
near as (
select 'NEAR' as symbol,
block_timestamp::date as date,
count(1) as n_txns,
QueryRunArchived: QueryRun has been archived