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 Reporting with SQL Date and Time Functions Today's Report

Grace BakerWhitcomb
Grace BakerWhitcomb
1,296 Points

Help with query please

Hi I cannot figure out this query. I've tried so many versions and I don't know what is wrong with my answer. Thank you for any help you can provide!

Here is my query: SELECT COUNT(*) AS shipped_today FROM orders WHERE status = “shipped” AND ordered_on = DATE(“now”);

Steven Parker
Steven Parker
231,265 Points

We need to see your actual code, please edit this question and add it.

2 Answers

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

Hey there Grace BakerWhitcomb ! 👋

I copy/pasted your query provided and was able to pass with it actually. The issue for me was both sets of the quotation marks. I'm not sure if that was just from me copying it from here and pasting it there, or if it's the same on your end. You'll need to be careful with those types of things. Sometimes copying characters like that from other sources end up being formatted differently and this challenge doesn't like it.

I'd try re-typing both sets of quotation marks and submitting your query again. If that doesn't work, please let us know! 😃

Grace BakerWhitcomb
Grace BakerWhitcomb
1,296 Points

Thank you Travis!! Your suggestion worked!! I started writing my queries in a google doc first because when I submit the answer and it's correct I forget what I did so I wanted a record. However, knowing now about the quotes thing I will not copy & paste from my doc but rather type out the answer in the course THEN copy it over. I was honestly going crazy! I would never have figured that out. Thank you again for taking the time to review my work and answering my question!

Steven Parker
Steven Parker
231,265 Points

As Travis discovered, the problem is with the quotes. What you have here are "word processing" style quotes, where the open and close are different :point_right: “ ”. But what you want to use are "programming" style quotes, where you use the same one to open and close :point_right: ".

Since there's only one quote key on the keyboard, if you type directly into the challenge you should get the correct kind. You're most likely to get the wrong kind if you cut from a formatted page and paste into the challenge.

Grace BakerWhitcomb
Grace BakerWhitcomb
1,296 Points

Thank you Steven for adding more detail to Travis's answer! It worked with the "programming" style quotes! I'm definitely going to be more aware of the quotation marks moving forward!! Appreciate your time and expertise!