binhachon14. [Hard] Revenue Distribution - Daily revenue
Updated 2021-12-25
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
›
⌄
with ens_domain_register as (
select
distinct
block_timestamp,
tx_id,
event_inputs:cost/1e18 as cost
from
ethereum.events_emitted
where
event_name in ('NameRegistered')
and
contract_address in ('0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85', '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5')
),
ens_domain_renewal as (
select
distinct
block_timestamp,
tx_id,
event_inputs:cost/1e18 as cost
from
ethereum.events_emitted
where
event_name in ('NameRenewed')
and
contract_address in ('0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85', '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5')
),
eth_price as (
select
date_trunc('day', hour) as blocktime,
avg(price) as price
from
ethereum.token_prices_hourly
where
symbol = 'WETH'
group by blocktime
),
Run a query to Download Data