#4 daily revenue part 2


#1

so does anyone know how to solve my problem in #4 daily revenue part 2.

Here is my code:
select date(ordered_at), round(sum(amount_paid),2) from orders join order_items on orders.id = order_items.order_id where name = ‘Kale-smoothie’ group by 1 order by 1;

Error message: filter to kale smoothie


#2

You need to specify which table you want the ‘name’ field to come from.
So instead of this:
where name = ‘Kale-smoothie’
You should write this:
where order_items.name = ‘kale-smoothie’


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.