0-MID daily trove inflow
Updated 2023-04-13
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
›
⌄
with act1 as (
with tab1 as (
select BLOCK_TIMESTAMP::date as date
,TX_HASH
from arbitrum.core.fact_event_logs
where ORIGIN_TO_ADDRESS='0xc873fecbd354f5a56e00e710b90ef4201db2448d' --Camelot Dex
and TX_STATUS='SUCCESS'
and EVENT_NAME='Swap'
and date>='2023-01-01'),
tab2 as (
select BLOCK_TIMESTAMP::date as date
,TX_HASH
,ORIGIN_FROM_ADDRESS
,CONTRACT_ADDRESS
,RAW_AMOUNT
from arbitrum.core.fact_token_transfers
where date>='2023-01-01'
and ORIGIN_FROM_ADDRESS=FROM_ADDRESS
and CONTRACT_ADDRESS in
(lower('0x982239D38Af50B0168dA33346d85Fb12929c4c07'))) --Trove
select tab2.date
,tab2.TX_HASH
,ORIGIN_FROM_ADDRESS
,CONTRACT_ADDRESS
,RAW_AMOUNT
from tab1
left join tab2
on tab1.TX_HASH=tab2.TX_HASH
and tab1.date=tab2.date),
act2 as (
select ADDRESS
,DECIMALS
,SYMBOL
from arbitrum.core.dim_contracts)
select date
,sum(RAW_AMOUNT/pow(10,decimals)) as volume
Run a query to Download Data