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 trialShari Staten
11,540 PointsIs this glitch? REPORTING WITH SQL, Challege 1:1.
Here's the question: "In an ecommerce database there's an orders table with the columns id, product_id, user_id, address_id, ordered_on, status and cost. Count the total number of orders that were ordered today and have the status of 'shipped'. Alias it to shipped_today."
My code: SELECT COUNT(*) AS shipped_by FROM orders WHERE status="shipped" AND ordered_on=DATE("now"); I get a count of 13.
I get this error: "Bummer! You're count calculation was wrong. Was expecting the count of 13."
Is this a glitch? I got it right and I'd like credit for the right answer before moving. What should I do?
4 Answers
Steven Parker
231,269 PointsYour code is giving the count column an alias of "shipped_by" but the instructions say "Alias it to shipped_today." instead.
Also, you should move this question to the "Database" topic category.
Shari Staten
11,540 PointsThank you, Steven...and thank you. I'm getting used to the categories for the Community here. I appreciate the reply.
Shari Staten
11,540 PointsYou got it, buddy...:-)
ABRAHAM NYONI
9,692 PointsAm getting 14 days but still can't pass. Is the question bugged
Steven Parker
231,269 PointsI suggest you start a new question and show your complete code in it. Using the "Get Help" button from within a challenge will usually format and add your code for you, and provide a button linking to the page.