Order Value per Region

Please assist. I would like to answer this question: "What is the average order value in the African Region per month?"

My Data Model(https://drive.google.com/file/d/1mXQpAl_m02ZtGzxNk2L_vFPCySzMR7qh/view?usp=sharing)

sample-data-tpch-schema

My Code:

SELECT Avg(Orders) AS Order Value

FROM Orders, Customer, Nation, Region

Join Customer AS C

ON Customer.Custkey = Orders.Custkey

Join Customer AS C ON Customer.Nationkey=Nation.Nationkey

Join Nation.Nationkey=Region.Nationkey

where Region = Africa

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.