select
lp_token_action,
case
when block_timestamp::date >= '2022-07-29' and block_timestamp::date <= '2022-08-04' then 'A week befor loss funds'
else 'A week after loss funds'
end as date_type,
count(distinct tx_hash) as number_of_transactions,
count(distinct origin_from_address) as number_of_minter,
sum(token0_amount_usd + token1_amount_usd) as volume_of_mint_burn
from optimism.velodrome.ez_lp_actions
where block_timestamp::date <= '2022-08-11'
and block_timestamp::date >= '2022-07-29'
group by lp_token_action, date_type