SELECT
ez.pool_name AS pool_name
, sum( ez.amount_in_usd ) AS total_amount_in
, sum( ez.amount_out_usd ) AS total_amount_out
, total_amount_in - total_amount_out AS net_liquidity
FROM
optimism.sushi.ez_swaps ez
WHERE
ez.block_timestamp::date >= '2022-06-01'
AND ez.block_timestamp::date < current_date
AND ez.platform = 'sushiswap'
AND ez.amount_in_usd IS NOT NULL
AND ez.amount_out_usd IS NOT NULL
GROUP BY
1
ORDER BY
4 DESC LIMIT 10