SELECT * from (
SELECT
date_trunc('day',block_timestamp) as date,
count(distinct(from_address)) as unique_depositors,
count(distinct(tx_id)) as deposit_count,
sum(amount_usd) as deposit_volume
from gold.ethereum_events
where to_address_name = 'uniswap v2: router 2'
and amount_usd > 0
and block_timestamp > getdate() - interval '1 month'
--and to_address_name <>
group by 1
) pools
order by pools.date desc;