0 votes
in Oracle by
Calculate the percentage of total sales each product contributes to the overall revenue.

1 Answer

0 votes
by

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

FROM sales

GROUP BY product_id;

Related questions

0 votes
asked Mar 25, 2022 in SAP S/4HANA Functional Capabilities 1909 by sharadyadav1986
0 votes
asked Aug 24, 2023 in Apache Superset by Robin
...