MLDZMNfee_3
Updated 2022-07-26Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with tb1 as (select
distinct TX_RECEIVER as contracts,
sum(GAS_USED/pow(10,12)) as GAS,
count(TX_HASH) as no_txn,
avg(GAS_USED/pow(10,12)) as averag_gas
from near.core.fact_transactions
group by 1
order by 2 desc
limit 10)
select
BLOCK_TIMESTAMP::date as day,
TX_RECEIVER as contract,
sum(GAS_USED/pow(10,12)) as GAS,
count(TX_HASH) as no_txn,
avg(GAS_USED/pow(10,12)) as averag_gas
from near.core.fact_transactions
where BLOCK_TIMESTAMP>=CURRENT_DATE-30
and TX_RECEIVER in (select contracts from tb1)
group by 1,2
order by 1
Run a query to Download Data