headitmanagerSwap Token Pairs on Polygon
Updated 2022-06-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
with address1 as (select distinct contract_address as add1,UPPER(symbol) as firsts from polygon.udm_events
where symbol is not null)
, address2 as (select distinct contract_address as add2,UPPER(symbol) as seconds from polygon.udm_events
where symbol is not null)
, address_table as (select concat(add1,' / ',add2) as address,concat(firsts,'/',seconds) as name from address1,address2 where firsts!=seconds)
, pair_Name as (select distinct
trim(UPPER(replace(replace(replace(replace(to_address_name,'SushiSwap',''),'Pool',''),'sushiswap',''),'pool',''))) as pair
from polygon.udm_events where event_name='transfer' and to_label ILIKE 'sushiswap'
and to_address_name not like '%other%' and to_address_name not like '%Other%' and event_type='erc20_transfer'
and to_address_name not like '%Router%')
,pair_address as (select distinct name,address from address_table where name in (select pair from pair_Name))
select * from pair_address
Run a query to Download Data