mohammadhMoonbirds Gass Fee _
Updated 2022-05-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with mint_tx as(select date_trunc('hour', block_timestamp) as block_khour,tx_hash,
case
when tx_status= 'SUCCESS' then 'SUCCESS_TX'
else 'FAILLED_TX' end as TX__STATUS
from ethereum_core.fact_event_logs
where CONTRACT_ADDRESS= '0x23581767a106ae21c074b2276d25e5c3e136a68b'
and EVENT_INPUTS:from='0x0000000000000000000000000000000000000000'
group by block_khour,tx_hash,TX__STATUS
order by block_khour),
sum_gas as(select SUM(TX_FEE) as sum_fee,SUM(GAS_PRICE) as sum_gass,date_trunc('hour', block_timestamp) as block_khour,tx_hash
from ethereum_core.fact_transactions
group by block_khour,tx_hash)
select sum_gas.sum_fee,sum_gas.sum_gass,mint_tx.block_khour,mint_tx.TX__STATUS from sum_gas
INNER JOIN mint_tx on mint_tx.tx_hash=sum_gas.tx_hash
Run a query to Download Data