select
date_trunc(day,block_timestamp)::date as date
,count(DISTINCT TX_HASH) as provides
,count(DISTINCT ORIGIN_FROM_ADDRESS) as providers
,sum(iff(LP_ACTION='deposit',LP_TOKEN_AMOUNT_USD,0)) as deposit_amount
,sum(iff(LP_ACTION='withdraw',LP_TOKEN_AMOUNT_USD,0)) as withdraw_amount
,deposit_amount-withdraw_amount as Net_LP_Amount_USD
from optimism.velodrome.ez_lp_actions
where LP_TOKEN_AMOUNT_USD>0
group by 1
order by 1