ambalikaSwap trading pairs
Updated 2022-12-20
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
›
⌄
-- SELECT * from bsc.core.fact_transactions
-- where (TO_ADDRESS='0x10ed43c718714eb63d5aa57b78b54704e256024e'
-- or FROM_ADDRESS='0x10ed43c718714eb63d5aa57b78b54704e256024e') -- pancakeswap v2 router
-- and status='SUCCESS'
-- and block_timestamp>=current_date - 7
-- --- method should be swap
-- limit 100
-- select * from bsc.core.fact_event_logs
-- where CONTRACT_ADDRESS='0x10ed43c718714eb63d5aa57b78b54704e256024e'
-- and tx_status='SUCCESS'
-- and event_name='Swap'
-- and block_timestamp>=current_date - 1
-- --- method should be swap
-- limit 100
-- select * from bsc.core.dim_labels
-- where lower(address)=lower('0xCEDcAA0F0DB9444366f19d7A3AfBb2519095Ba57')
select CONTRACT_ADDRESS,CONTRACT_NAME,
-- label_type,
count(DISTINCT tx_hash) trx
from bsc.core.fact_event_logs e
-- left join bsc.core.dim_labels l on e.contract_address=l.address_name
where (ORIGIN_TO_ADDRESS='0x10ed43c718714eb63d5aa57b78b54704e256024e'
or ORIGIN_FROM_ADDRESS='0x10ed43c718714eb63d5aa57b78b54704e256024e')
and tx_status='SUCCESS'
and event_name='Swap'
and block_timestamp>=current_date - 1
--- method should be swap
group by 1,2
order by 3 desc
Run a query to Download Data