Mrfti2024-03-16 11:15 PM
Updated 2024-05-15
999
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
›
⌄
with alll AS
((
with tbl1 AS
(
SELECT
date_trunc (day, BLOCK_TIMESTAMP) as "Date",
'USDB deposit' as "Action",
count (origin_from_address) as "Total users",
count (DISTINCT origin_from_address) as "Total unique users",
sum (amount) as "Total deposited tokens",
sum (AMOUNT_USD) as "Total deposited tokens (USD)"
from blast.core.ez_token_transfers
where contract_address = '0x4300000000000000000000000000000000000003'
and origin_to_address = '0x9aecedcd6a82d26f2f86d331b17a1c1676442a87'
and to_address = '0x9aecedcd6a82d26f2f86d331b17a1c1676442a87'
and ORIGIN_FUNCTION_SIGNATURE = '0xa0712d68'
GROUP by 1
)
,tbl2 as
(
SELECT
date_trunc (day, BLOCK_TIMESTAMP) as "Date",
'USDB withdraw' as "Action",
count (origin_from_address) as "Total users",
count (DISTINCT origin_from_address) as "Total unique users",
sum (amount) as "Total withdrew tokens",
sum (AMOUNT_USD) as "Total withdrew tokens (USD)"
from blast.core.ez_token_transfers
where contract_address = '0x4300000000000000000000000000000000000003'
and origin_to_address = '0x9aecedcd6a82d26f2f86d331b17a1c1676442a87'
and from_address = '0x9aecedcd6a82d26f2f86d331b17a1c1676442a87'
and ORIGIN_FUNCTION_SIGNATURE = '0x852a12e3'
GROUP by 1
)
SELECT