SELECT product_id, SUM(total_amount) / (SELECT SUM(total_amount) FROM sales) * 100 AS percentage_contribution
FROM sales
GROUP BY product_id;