mz0111Untitled Query
Updated 2022-11-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
WITH meta_addr AS
(SELECT distinct origin_from_address as unique_address
from ethereum.core.fact_event_logs
WHERE CONTRACT_ADDRESS = '0x2e9d63788249371f1dfc918a52f8d799f4a38c94')
select count(distinct origin_from_address) as total_address,
case when lower(text_signature) like ('%swap%') then 'Swapping'
when lower(text_signature) like ('%sign%') then 'Signing'
when lower(text_signature) like ('%deposit%') then 'Deposit'
when lower(text_signature) like ('%withdraw%') then 'Withdrawal'
when lower(text_signature) like ('%liquidity%') then 'Staking/Unstaking' -- Most likely to be add_liquidity
when lower(text_signature) like ('%stake%') then 'Staking/Unstaking'
when lower(text_signature) like ('%mint%') then 'Minting'
when lower(text_signature) like ('%transfer%') then 'Transferring'
else 'Other Activity' end as type
from ethereum.core.fact_event_logs
join meta_addr on origin_from_address = unique_address
join ethereum.core.dim_function_signatures on origin_function_signature = bytes_signature
where block_timestamp::date >= '2022-01-01'
group by type
Run a query to Download Data