Lesson 4


#1

I am on lesson 4. The query comes out but it says that I need to Sum the daily revenues. This is what I put in. Any ideas why it isn't correct?

select date(ordered_at), round(sum(amount_paid),2)
from orders
join order_items on
orders.id = order_items.order_id
group by 1
order by 1;


#2

I am having the sum problem.


#3

Chuck a space in after sum(amount_paid),

like so:
select date(ordered_at), round(sum(amount_paid), 2)


#4

Here is what I did:
select date(ordered_at), round(sum(amount_paid), 2)
from orders
join order_items on
orders.id = order_items.order_id
group by 1
order by 1;

Turns out the code checker wasn't working. Just keep hitting run until it spits out the code for you.


#5

Had the same problem and it was the space that posed all the trouble


#6

is the space important? or it is only for the checker?
Because I can see correct result in the table.


#7

I think space is required in syntax...


#8

i think the space is important in regards to the 'checker'. Otherwise, it works fine for me


#9

Thank you all! I'm not sure what the issue really was becausethe table did show up. I did run it again and again and adjusted spaces and it finally took.