MahrooUntitled Query
Updated 2022-10-02Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
WITH cte AS(SELECT
case WHEN BLOCK_NUMBER < 15537393 THEN 'Before_Merge'
WHEN BLOCK_NUMBER >= 15537393 THEN 'After_Merge'
END A,
date_trunc('day',block_timestamp) as day, sum(ETH_VALUE) as eth_amount,COUNT(DISTINCT FROM_ADDRESS) as wallet,COUNT(DISTINCT TX_HASH) as tx_count
FROM ethereum.core.fact_transactions
WHERE day >= '2022-09-01'
group by A,day
order by day asc)
SELECT A, sum(eth_amount) as total_eth_amount, sum(wallet) as total_uniqe_user, sum(tx_count) as total_tx
from cte
group by 1
Run a query to Download Data