mlhnear gas 4
Updated 2022-07-23Copy Reference Fork
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
26
27
28
29
›
⌄
with contracts_fee as
(SELECT BLOCK_TIMESTAMP as date, TX_RECEIVER, TRANSACTION_FEE/1e24 as fee, TX_HASH
FROM near.core.fact_transactions
)
select
(select sum(fee) as total_fee
from contracts_fee) as total_fee,
(select count(*) as total_txs
from contracts_fee) as total_txs,
(select sum(fee) as total_fee
from contracts_fee
where date_trunc('month',date)>=date_trunc('month',current_date)) as month_fee,
(select count(*) as total_txs
from contracts_fee
where date_trunc('month',date)>=date_trunc('month',current_date)) as month_txs,
(select sum(fee) as total_fee
from contracts_fee
where date_trunc('week',date)>=date_trunc('week',current_date)) as week_fee,
(select count(*) as total_txs
from contracts_fee
where date_trunc('week',date)>=date_trunc('week',current_date)) as week_txs
Run a query to Download Data