daniel1234567QA2.1 -- Weekly + Scatter
Updated 2022-12-07
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
›
⌄
/* Test Query 2.1 — Time Series, Weekly, Categorical (12) */
with big_spendas as (
select
ORIGIN_FROM_ADDRESS as from_address,
sum(total_fees_usd) as fee_total
from ethereum.core.ez_nft_sales
where date_trunc('day',block_timestamp) > current_date - interval '90 days'
and total_fees_usd is not null
group by 1 order by 2 desc
limit 12
)
SELECT
date_trunc ('week', block_timestamp) as date,
from_address,
sum(tx_fee) as tx_fees,
sum(gas_used) as gas_used,
avg(gas_price) as gas_price,
avg(eth_value) as eth_value
FROM ethereum.core.fact_transactions
where
from_address in (select from_address from big_spendas)
and date_trunc('day',block_timestamp) > current_date - interval '365 days'
group by 1,2
Run a query to Download Data