MahrooUntitled Query
Updated 2022-10-07
99
1
2
3
4
5
6
7
8
9
10
11
›
⌄
SELECT date_trunc('day',block_timestamp) as day,
Case when block_timestamp > '2022-05-27' then 'Inception date'
when block_timestamp < '2022-05-27' then 'Before Inception date'
end as D ,
count(DISTINCT tx_id) AS "TX count", count(DISTINCT TX:body:messages[0]:from_address) AS senders,count(DISTINCT TX:body:messages[0]:to_address) AS receivers,
sum(TX:body:messages[0]:amount[0]:amount)/pow(10,6) AS "volume", sum(fee) AS Total_fees
FROM terra.core.fact_transactions
WHERE tx:body:messages[0]:amount[0]:denom = 'uluna'
AND tx_succeeded = true
GROUP by 1,2
Run a query to Download Data