select
SUBSTRING(address_name, CHARINDEX(':', address_name)+1, LEN(address_name)) as token,
count (distinct tx_hash) as "Number of swaps"
from Optimism.core.fact_event_logs x join Optimism.core.dim_labels y on x.contract_address = y.address
where origin_to_address = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57' and (origin_from_address = event_inputs:to or origin_from_address = event_inputs:from)
and event_name ilike 'transfer'
and block_timestamp >= '2023-01-01'
group by 1
order by 2 desc
limit 10