I wish to find out the total sales per industry using SQL.
Tables:
- Sales
- Customer
- Industry
The tables are linked as follows:
- Sales is linked to Customer by Customer_ID
- Customer is linked to Industry by Industry_ID
The Sales table contains each sale (price + customer_id)
The Customer table contains each customer (customer_id, industry_id)
The Industry table contains each industry (industry_id, industry_name)
I simply want to get the total sales for each Industry using SQL, with the result looking like this:
INDUSTRY_NAME | TOTAL SALES
Industry4 9876
Industry2 8889
Industry3 7787
Industry1 2898
Can anyone work out the Query needed to select this data?