nitsMetamask vs Others
Updated 2022-06-26Copy Reference Fork
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
›
⌄
WITH metamask as
(SELECT date(block_timestamp) as day ,'metamask' as platform, sum(amount_usd) as total_amt, sum(total_amt) over (order by day) as cumulative_amt ,
avg(amount_usd)as avg_amt_swap, avg(avg_amt_swap) over (order by day) as avg_amt_swap_over_time ,
count(DISTINCT tx_hash) as total_txs,
sum(total_txs) over (order by day) as cumulative_swaps
from ethereum.core.ez_token_transfers
where origin_to_address = lower('0x881D40237659C251811CEC9c364ef91dC08D300C') and day >= '2022-01-01'
AND amount_usd < pow(10,9)
GROUP by 1) ,
swap as
(SELECT date(block_timestamp) as day ,
platform as pt ,
sum(amount_in_usd) as total_amt,
sum(total_amt) over (partition by platform order by day) as cumulative_amt ,
avg(amount_in_usd)as avg_amt_swap,
avg(avg_amt_swap) over (partition by pt order by day) as avg_amt_swap_over_time ,
count(DISTINCT tx_hash) as total_txs,
sum(total_txs) over (partition by platform order by day) as cumulative_swaps
from ethereum.core.ez_dex_swaps
where amount_in_usd is not NULL and amount_in_usd < pow(10,9) and day >= '2022-01-01'
GROUP by 1 ,2)
-- LIMIT 10
SELECT * from swap
UNION ALL
SELECT * from metamask
Run a query to Download Data