SELECT
date_trunc('day', block_timestamp) as day,
CASE WHEN block_timestamp > '2022-07-14' THEN 'post incentives' ELSE 'pre incentives' END as time_period,
count(DISTINCT tx_hash) as transactions,
count(DISTINCT origin_from_address) as users,
sum(amount_in_usd) as volume
FROM optimism.velodrome.ez_swaps
GROUP BY 1,2