mlhUntitled Query
Updated 2022-10-07
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
SELECT date_trunc('day', block_timestamp) AS date,
LABEL_TYPE,
Label,
count(DISTINCT tx_id) AS trxs,
count(DISTINCT TX:body:messages[0]:from_address) AS users,
sum(TX:body:messages[0]:amount[0]:amount)/1e6 AS volume,
sum(trxs) over (partition by LABEL_TYPE order by date) as cum_trxs,
sum(volume) over (partition by LABEL_TYPE order by date) as cum_vol
FROM terra.core.fact_transactions a JOIN terra.classic.dim_labels b on a.TX:body:messages[0]:to_address = b.ADDRESS
WHERE tx:body:messages[0]:amount[0]:denom = 'uluna'
AND tx_succeeded = true
group by 1,2,3
order by 1
Run a query to Download Data