select
count(distinct BUYER_ADDRESS) as Buyers,
count(distinct SELLER_ADDRESS) as Sellers,
count(distinct tx_hash) as TXN,
case
when block_timestamp >= '2022-08-01' and block_timestamp < '2022-09-15' then 'Before Merge'
when block_timestamp >= '2022-09-15' then 'After Merge' else null end as Merge
from ethereum.core.ez_nft_sales
where block_timestamp >= '2022-09-05' and block_timestamp <= '2022-09-24'and PLATFORM_NAME = 'opensea'
group by Merge