jackguyPolygon Hard Fork 1
Updated 2023-02-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
SELECT
date_trunc('day', block_timestamp) as day,
case WHEN date_trunc('day', block_timestamp) > '2023-01-17' THEN 'Post Hard Fork' ELSE 'Pre Hard Fork' END as time_period,
count(DISTINCT tx_hash) as transaction,
sum(tx_fee) as total_fees_matic,
avg(tx_fee) as avg_fee_matic,
sum(tx_fee * price) as total_fees_usd,
avg(tx_fee * price) as avg_fee_usd,
COUNT(DISTINCT FROM_ADDRESS) as users
FROM polygon.core.fact_transactions
LEFT outer JOIN (
SELECT
date_trunc('day', hour) as day1,
avg(price) as price
FROM ethereum.core.fact_hourly_token_prices
WHERE symbol LIKE 'MATIC'
GROUP BY 1
) as a
on date_trunc('day', block_timestamp) = day1
GROUP BY 1,2
HAVING day > '2022-12-18'
Run a query to Download Data