CryptoIcicleUntitled Query
Updated 2023-02-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
›
⌄
select 'Gains Network' as platform,
date_trunc('{{date_range}}',block_timestamp) as date,
count (distinct tx_hash) as TX_Count,
count (distinct origin_from_address) as Users_Count,
sum (event_inputs:value/1e18) as Total_Volume,
avg (event_inputs:value/1e18) as Average_Volume,
median (event_inputs:value/1e18) as Median_Volume,
min (event_inputs:value/1e18) as Minimum_Volume,
max (event_inputs:value/1e18) as Maximum_Volume,
sum (TX_Count) over (order by date) as Cumulative_TX_Count,
sum (Total_Volume) over (order by date) as Cumulative_Volume,
sum (Users_Count) over (order by date) as Cumulative_User,
avg (Total_Volume) over (order by date) as Avg_Total_Volume
from arbitrum.core.fact_event_logs
where origin_to_address in ('0x2f67a8d26f370b922b31b199c7946c3ed53c10c6','0x6c612c804c84e3d20e3109c8efd06cd2d8b28f46','0xcfa6ebd475d89db04cad5a756fff1cb2bc5be33c')
and event_name = 'Transfer'
and event_inputs:from = Origin_From_Address
and contract_address = '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' -- DAI
and tx_status= 'SUCCESS'
and block_timestamp >= '{{start_date}}'
group by 1,2
order by date
Run a query to Download Data