badboyUntitled Query
Updated 2022-12-07
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 maintable
as (
select date_trunc (hour,block_timestamp)
as date,
case when origin_function_signature = '0x9dcaafb4' then '$APE Only Pool'
when origin_function_signature = '0x8ecbffa7' then 'MAYC Pool'
when origin_function_signature = '0x46583a05' then 'BAYC Pool'
when origin_function_signature = '0xd346cbd9' then 'BAKC Pool'
else null end as pool_type,
count (distinct tx_hash) as TX_Count,
count (distinct origin_from_address) as Users_Count,
sum (event_inputs:value/1e18) as Volume
from ethereum.core.fact_event_logs
where origin_to_address = '0x5954ab967bc958940b7eb73ee84797dc8a2afbb9'
and event_name = 'Transfer'
and tx_status = 'SUCCESS'
and pool_type is not null
group by 1,2)
select pool_type,
avg (tx_count) as Average_TX_Count,
avg (users_count)
as Average_Users_Count,
avg (volume)
as Average_APE_Volume
Run a query to Download Data