AlexayUntitled Query2
Updated 2023-04-13Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
SELECT
count(*) as activity ,
case when ORIGIN_TO_ADDRESS = '0xb27198a99e3ae693f4dd14cfee89e98eaf413263' then 'Hold'
when ORIGIN_TO_ADDRESS = '0xa45645ebb075a96d1c89511e28d3e9b94f3b7905' then 'Stake'
when ORIGIN_TO_ADDRESS = '0x55b1e2d8b13e7acad03353fad58fc3fa065c5822' then 'Unstake'
when ORIGIN_TO_ADDRESS = '0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' then 'Swap UNI'
when ORIGIN_TO_ADDRESS = '0x55b1e2d8b13e7acad03353fad58fc3fa065c5822' then 'Transfer'
End as volume
from ethereum.core.fact_event_logs
where CONTRACT_ADDRESS = lower('0x55b1e2D8b13E7acad03353FAD58fc3FA065C5822')
and ORIGIN_FROM_ADDRESS in ( select distinct(ORIGIN_FROM_ADDRESS)
from ethereum.core.fact_event_logs
where ORIGIN_TO_ADDRESS = '0xb27198a99e3ae693f4dd14cfee89e98eaf413263'
and EVENT_NAME = 'Claimed'
and ORIGIN_FROM_ADDRESS != '0x0fbb8d17027b16810795b12cbeadc65b252530c4' )
group by volume
Run a query to Download Data