SELECT
product_type,
COUNT(DISTINCT tx_hash) AS transaction_count,
COUNT(DISTINCT book_address) AS unique_book_addresses
FROM
arbitrum.vertex.dim_products
WHERE
inserted_timestamp >= DATEADD(DAY, -30, CURRENT_TIMESTAMP()) -- Change the time window as needed
GROUP BY
product_type
ORDER BY
transaction_count DESC;