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 trialAnastasia Lynn-Smith
1,773 PointsDate challenge - what am I doing wrong?
I entered my answer as:
SELECT COUNT(*) FROM orders AS "shipped_today" WHERE status = "shipped" AND ordered_on = DATE("now");
...but I'm getting the message 'Your count calculation is wrong, was expecting 13'.
Can anyone tell me what's wrong in my code?
2 Answers
Brandon White
Full Stack JavaScript Techdegree Graduate 34,662 PointsHi Anastasia,
The logic for your statement is sound, youβre just not aliasing the COUNT column correctly. Which I think is causing the test to not be able to find the proper column in which to search for the count.
Change it to SELECT COUNT(*) AS shipped_today FROM... and youβll be all set.
Anastasia Lynn-Smith
1,773 PointsAhh, ok! Thankyou!