Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Wording issue in 'reporting-with-sql/date-and-time-functions/calculating-dates-2'.

Wording issue in 'reporting-with-sql/date-and-time-functions/calculating-dates-2'. If you read the question it can be inferred that the expectation is to pass status = 'shipped' AND ordered_on = DATE("now", "-1 day") in the where clause.

However based on the table names you can only safely assume the item was ordered_on and that the status is shipped. You can't assume the shipped_on date would necessarily be the same as the ordered_on date. Since there is no shipped_on column the question seems strange.

The question should be clarified to: Count the total number of orders that have the status of shipped *and were ordered* yesterday. Alias it to shipped_ordered_yesterday. Especially on mobile the expectation is unclear. I read it originally as if I should do status = 'shipped_yesterday' because the font is not "code formatted" around that statement on android app.

Another approach would be to just changed the ordered_on column to shipped_on.

Tagging Andrew Chalkley