Yousefi_1994Gas Guzzlers - Flow Daily Average Block Gas Price
Updated 2022-12-18
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
30
31
32
33
34
35
36
›
⌄
-------------------------------------flow-------------------------------------
with flow_fee_transactions as (
select
block_timestamp,
tx_id as tx_hash,
block_height as block_number,
event_data:amount as fee
from flow.core.fact_events
where event_contract = 'A.f919ee77447b7497.FlowFees'
and event_type = 'FeesDeducted'
and block_timestamp::date > current_date - 31
),
flow_fee_transactions_with_user as (
select
fee.*,
transactions.proposer as from_address
from flow_fee_transactions fee
join flow.core.fact_transactions transactions
on fee.tx_hash = transactions.tx_id
),
flow_price_usd as (
select
timestamp::date as days,
avg(price_usd) as price_usd
from flow.core.fact_prices
where token_contract = 'A.1654653399040a61.FlowToken'
and timestamp::date > current_date - 31
group by days
),
flow_fee_transactions_with_price as (
select
gas.*,
price.price_usd
from flow_fee_transactions_with_user gas
join flow_price_usd price
Run a query to Download Data