select trunc(block_timestamp,'week') as date,
concat(symbol_in,'-',symbol_out) as pair, count(distinct(tx_hash)) as frequency, sum(amount_out_usd) as volume
from near.defi.ez_dex_swaps
where block_timestamp>=current_date-90 and block_timestamp<trunc(current_date,'week')
group by 1,2
having frequency>1000
order by 1 desc