kiacryptoTop popular activity for whose bridged from Ethereum to Polygon
Updated 2022-07-31
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 bridge as (
select
to_address as unique_user,
min(block_timestamp) as date
from polygon.core.fact_token_transfers
where
origin_from_address = '0x0000000000000000000000000000000000000000' and
origin_to_address = '0x0000000000000000000000000000000000000000' and
from_address = '0x0000000000000000000000000000000000000000'
group by 1
),
top as (
select row_number() over (partition by origin_to_address order by block_timestamp asc) as rank, origin_to_address
from polygon.core.fact_event_logs, bridge
where origin_from_address = unique_user and block_timestamp::date > date
)(
select
case when address_name ilike '%aave%' then 'Aave'
when address_name ilike '%sushiswap%' then 'SushiSwap'
when address_name ilike '%celsius%' then 'Celsius'
when address_name ilike '%uniswap%' then 'Uniswap'
when address_name ilike '%hop%' then 'Hop bridge'
when address_name ilike '%quickswap%' then 'QuickSwap'
when address_name ilike '%orbit%' then 'Orbit'
when address_name ilike '%1inch%' then '1inch'
when address_name ilike '%metamask%' then 'Metamask'
when address_name ilike '%curve' then 'Curve'
when address_name ilike '%xpollinate%' then 'Xpollinate'
when address_name ilike '%wormhole%' then 'Wormhole'
when address_name ilike '%flux%' then 'Flux protocol'
when address_name ilike '%insurace%' then 'Insurace protocol'
else 'others' end as platform,
count(*) as "count"
from top join polygon.core.dim_labels l on top.origin_to_address = l.address
where
rank = 1 and
Run a query to Download Data