mo115degate - usdc ( Arb to eth )
Updated 2023-04-22
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
›
⌄
-- forked from degate usdc (eth to Arb) @ https://flipsidecrypto.xyz/edit/queries/26a17026-0691-4655-b7c9-0eb111fc2992
with txs as (select
a.BLOCK_TIMESTAMP,
a.TX_HASH,
a.FROM_ADDRESS,
a.AMOUNT,
a.SYMBOL,
a.TOKEN_PRICE,
b.TX_FEE,
b.GAS_PRICE_PAID
from
arbitrum.core.ez_token_transfers a
left join arbitrum.core.fact_transactions b on a.TX_HASH = b.TX_HASH
where
a.TO_ADDRESS = '0xa3af00a4ca8a11b840b1cb190d1c1d66da1546fc'
and a.CONTRACT_ADDRESS = '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8')
select
date_trunc('day', BLOCK_TIMESTAMP) as date,
count(DISTINCT TX_HASH) as transactions,
count(DISTINCT FROM_ADDRESS) as wallets,
sum (AMOUNT) as AMOUNT_USDC,
sum (AMOUNT_USDC) over (order by date) as cumulative_USDC,
sum (TX_FEE) as Paid_TX_FEE,
avg (GAS_PRICE_PAID) as GAS_PRICE_PAID,
avg (TOKEN_PRICE) as USDC_PRICE
from
txs
group by 1
Run a query to Download Data