dcfpascalstarknet tx
Updated 2023-12-21Copy 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
›
⌄
with pricet as (
SELECT
HOUR::date as pdate,
avg(price) as usd
from crosschain.price.ez_hourly_token_prices
where SYMBOL = 'WETH'
group by 1
)
SELECT
date_trunc('day', TIMESTAMP) as days,
count(distinct tx_hash) as txs,
count(distinct CONTRACT) as users,
sum(ACTUAL_FEE/pow(10,18)) as "Paid Fee (ETH)",
sum((ACTUAL_FEE * usd)/pow(10,18)) as "Paid Fee (USD)",
sum(ACTUAL_FEE/pow(10,18))/count(distinct tx_hash) as "Paid Fee per tx"
from external.tokenflow_starknet.decoded_transactions
left join pricet on pdate = TIMESTAMP::date
where CHAIN_ID = 'mainnet'
and TIMESTAMP < current_date
and TIMESTAMP > '2023-12-10 00:00:00.000'
group by 1
order by 1 asc
QueryRunArchived: QueryRun has been archived