-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstakedeth.sql
More file actions
33 lines (33 loc) · 889 Bytes
/
stakedeth.sql
File metadata and controls
33 lines (33 loc) · 889 Bytes
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
with base as (
select
block_timestamp as tx_date,
tx_hash,
from_address as user,
value_precise,
tx_fee_precise as tx_fee_mon,
cumulative_gas_used,
from
monad.testnet.fact_transactions
where
0 = 0
and to_address = '0xe6db1fb846a59e0780124b659358b6d2ccb45a81'
and origin_function_signature = '0xe8bbf5d7'
and tx_succeeded = 'TRUE'
and block_timestamp >= '2025-02-18'
)
select
date_trunc('day', tx_date) as tx_date,
count(distinct tx_hash) as total_transactions,
count(distinct user) as total_user,
sum(tx_fee_mon) total_fee_generated,
sum(cumulative_gas_used) as total_gas_used,
sum(total_transactions) over () as cumulative_tx,
--count(distinct user) over () as total_wallets,
sum(total_fee_generated) over () as cumulative_fee,
sum(total_gas_used) over () as cumulative_gas
from
base
group by
1
order by
1 desc