Jump to content

Order Value per Region


yrstruly

Recommended Posts

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

My Data Model:

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...