SELECT product_id, SUM(sales_amount) AS total_sales, AVG(sales_amount) AS avg_sales
FROM sales
GROUP BY product_id;