MoDeFibase 02-00
Updated 2023-08-05
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
›
⌄
with eth_price as
(select HOUR, PRICE
from ethereum.core.fact_hourly_token_prices
where TOKEN_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
base_contract_create as (
select BLOCK_TIMESTAMP, FROM_ADDRESS as user, tx_hash, TX_FEE*price as fee
from base.core.fact_transactions
left join eth_price
on hour=date_trunc(hour, BLOCK_TIMESTAMP)
where ORIGIN_FUNCTION_SIGNATURE='0x60806040'
and TO_ADDRESS is null and STATUS='SUCCESS'
),
creators as (
select user, min(BLOCK_TIMESTAMP) as min_date
from base_contract_create
group by 1),
creations as (
select date_trunc({{time_interval}},BLOCK_TIMESTAMP) as date_, count(tx_hash) as txs
from base_contract_create
group by 1)
select
count(*) as "Contracts",
count(distinct user) as "Users",
avg(fee) as "Average Fee",
median(fee) as "Median Fee"
from base_contract_create
Run a query to Download Data