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

Databases

Please advise on this SQL code - thank you!

Hi all

I've tried this challenge a quite few times, with various adjustments to my code - still no luck.

Please could you advise me as to what I need to consider changing, and how I might modify it to make a successful SQL statement?

Many Thanks!

3 Answers

Hi Adrian Brenton,

Here is the sql code:

select count(*) as shipped_today from orders where ordered_on = DATE('now') and status = 'shipped' ;

If you any doubts, please let me know.

Hope this helps!

Adrian Brenton Can you please paste your question - which sql code you are trying to solve?

Hello Mohammed

This link should take you to the challenge I am trying to complete:

https://teamtreehouse.com/library/reporting-with-sql/date-and-time-functions/todays-report

Many Thanks!

select count(*) as shipped_today from orders where status="shipped" and ordered_on=DATE();

this should help. I use the DATE() function to get the current date.