Simple query... but I'm stuck

Hey all,

I’m going back and practicing some of the beginner courses of SQL and I keep getting stuck writing a query for the following:

" Given a cities table, write the query to select only the cities with temperature less than 75."

The practice sessions don’t let you submit an answer until it’s correct so I’m not sure where I’m going wrong; it’s also difficult to tell what the parameters of the hypothetical table are.

Assuming temperature is an integer, I would think it’s a simple “WHERE” exercise:

FROM cities
WHERE temperature < 75;

Where am I going wrong? Or rather, what answer is the question wanting me to enter?


You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

What’s the schema of the table?

“select only the cities” might mean to select only the cities column if there is such a thing (where temp<75).

The schema isn’t given in the practice sessions - that’s where it’s a bit confusing.

it usually shows on the right hand side in the codecademy environment. If you run any command like select * for example it’ll show.

Screen Shot 2020-07-29 at 10.57.31 PM

I know what you’re saying.

I can’t screen record but it doesn’t let you enter any code, only “submit answer” which will stay grayed out with a red do not enter looking cursor until the correct code has been entered - then it’ll turn green and allow you to “submit answer.”

It’s under the second chapter of the SQL syllabus - under practice.

Unless “ctrl+enter” isn’t how submitting code works…??