Skip to content
Advertisement

Getting unknown column in on clause when trying to get the latest record

I have two tables orders and order_items I am trying to get the last order_sum for each day using an inner join but I am running into an error in my second join.

Unknown column ‘o.last_order_date’ in ‘on clause

Here is my query

And here is the result I would like to get

Here is a fiddle with schema http://sqlfiddle.com/#!9/bf799d/6

Advertisement

Answer

You already asked this in your previous question you were nearly there with the second inner join

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement