freemartian2023-12-04 05:30 PM
Updated 2023-12-06
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
33
34
35
36
›
⌄
--transfer to hyper: 0xa9059cbb
--deposit in hyper: 0xb6b55f25
--withdraw: 0x5b4d793d
with first_tx AS(
SELECT from_address AS wallet, min(block_timestamp) AS start_date
FROM arbitrum.core.ez_token_transfers
WHERE to_address = '0xc67e9efdb8a66a4b91b1f3731c75f500130373a4'
-- AND origin_function_signature IN('0xa9059cbb')
GROUP BY 1
),
inflow AS(
SELECT
block_timestamp::date AS in_day,
count(DISTINCT tx_hash) AS in_tx_count,
count(DISTINCT from_address) AS in_wallet_count,
sum(amount) AS in_amount,
sum(amount_usd) AS in_amount_usd
-- count(DISTINCT wallet) AS new_users
FROM arbitrum.core.ez_token_transfers
-- INNER JOIN first_tx ON block_timestamp::date = start_date::date
WHERE to_address = '0xc67e9efdb8a66a4b91b1f3731c75f500130373a4'
AND origin_function_signature IN('0xb6b55f25','0xa9059cbb')
-- AND tx_hash in ('0x7d0e7b150a403f3d67d1a69ef9a5f2e929bde49bc93b713fa3a89bdae0d47c85','0xfd5e639a39ff20370ad8906cd2e167579e19b5183039e75dfdb7484b9bb25930','0x80cf4249201c96a642e02b7d26286f3a92e042217e57aeebf41b5392c123da6c')
GROUP BY 1
ORDER BY 1 ASC
),
outflow AS(
SELECT
block_timestamp::date AS out_day,
count(DISTINCT tx_hash) AS out_tx_count,
Run a query to Download Data