nitsCopy of wETH vs wBTC inflow
Updated 2022-06-08
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with addr as
(select address, label from osmosis.core.dim_labels
where project_name ilike '%WBTC%' or project_name ilike '%WETH%'
) ,
b as (SELECT tx_id as tx ,label, address from osmosis.core.fact_msg_attributes
inner join addr on attribute_value = address )
SELECT date(block_timestamp) as day, label, sum(amt)/pow(10,18) as total_amt, count(DISTINCT tx_id) as distinct_txs
from
(SELECT *
, replace(attribute_value, address, '' ) as amt
from osmosis.core.fact_msg_attributes
inner join b on tx_id = tx
where msg_type = 'coin_received' and attribute_key = 'amount' and contains(attribute_value, address)
)
GROUP by 1,2
-- coinspent
Run a query to Download Data