0xaimanUST Competitive Advantages
Updated 2022-05-05
99
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
›
⌄
with a as (select date_trunc('day',t) as hr, count(tx_id) as tc1, avg(gas_wanted), avg(gas_used), max(fee_paid_ust) as max_fee1
from
(Select block_timestamp as t,tx_from, tx_id, x.value:amount[0]:amount/1000000 as fee_paid_ust,gas_used,gas_wanted
from terra.transactions, table(flatten(input=>fee))x
where --tx_id='E3AFDE2C919C55D43ACB09DC318D3EE29C53F221CC18D51B3424973B599D440C' and
x.value:amount[0]:denom='uusd')
group by 1 order by 1
),
b as (select date_trunc('day',t) as hr2,count(tx_id) as tc2, max(fee_usd) as max_fee2 from(
select block_timestamp as t,tx_id, fee_usd
from ethereum.transactions
where -- tx_id='0x155e07e744fe306963bafb49d416d3152f85312666d381f1a3f2621d3ebba2ce' and
symbol='DAI'
) group by 1 order by 1)
select a.hr, max_fee1, max_fee2, tc1 as UST_n_txn, tc2 as DAI_n_txn
from A
inner join b on a.hr=b.hr2
Run a query to Download Data