HosseinUntitled Query
Updated 2022-12-08
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
›
⌄
select
case
when b.event_name ilike '%withdraw%' then 'Withdraw'
when b.event_name ilike '%transfer%' then 'Transfer'
when b.event_name ilike '%swap%' then 'Swap'
when b.event_name ilike '%approval%' then 'Approval'
when b.event_name ilike '%deposit%' then 'Deposit'
when b.event_name ilike '%sync%' then 'Sync'
when b.event_name ilike '%mint%' then 'Mint'
when b.event_name ilike '%burn%' then 'Burn'
when b.event_name ilike 'stake%' then 'Stake'
when b.event_name ilike 'unstake%' then 'UnStake'
when b.event_name ilike 'claim%' then 'Claim'
else null
end "Event",
count (distinct b.tx_hash) "TX Count"
from ethereum.uniswapv3.ez_swaps a
join ethereum.core.fact_event_logs b
on b.block_timestamp = (
select min(block_timestamp) from ethereum.core.fact_event_logs c
where 1 = 1
and c.origin_from_address = a.recipient
and c.block_timestamp > a.block_timestamp
)
where 1 = 1
and a.block_timestamp >= current_date - interval '2 weeks'
and token1_symbol in ('USDT', 'USDC', 'DAI', 'BUSD')
and token0_symbol not in ('USDT', 'USDC', 'DAI', 'BUSD')
group by 1
having "Event" is not null
order by 2 desc
Run a query to Download Data