Afonso_DiazUser Frequency
Updated 2025-02-23
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 main as (
select tx_hash, block_timestamp, borrower as user, token_symbol as symbol, amount_usd,
case when platform ilike 'aave%' then 'Aave' else platform end as platform,
'Borrow' as event_name
from avalanche.defi.ez_lending_borrows
union all
select tx_hash, block_timestamp, depositor as user, token_symbol as symbol, amount_usd,
case when platform ilike 'aave%' then 'Aave' else platform end as platform,
'Deposit' as event_name
from avalanche.defi.ez_lending_deposits
union all
select tx_hash, block_timestamp, depositor as user, token_symbol as symbol, amount_usd,
case when platform ilike 'aave%' then 'Aave' else platform end as platform,
'Withdraw' as event_name
from avalanche.defi.ez_lending_withdraws
union all
select tx_hash, block_timestamp, payer as user, token_symbol as symbol, amount_usd,
case when platform ilike 'aave%' then 'Aave' else platform end as platform,
'Repay' as event_name
from avalanche.defi.ez_lending_repayments
),
user_activity as (
select
user,
platform,
count(*) as tx_count
from main
group by user, platform
),
categorized_users as (
select
platform,
case
when tx_count between 1 and 5 then 'Casual User'
QueryRunArchived: QueryRun has been archived