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 Ordering, Limiting and Paging Results Limiting Results

Raymond Moore
seal-mask
.a{fill-rule:evenodd;}techdegree
Raymond Moore
Full Stack JavaScript Techdegree Student 11,174 Points

SQL Query ?

I'm looking for a little assist on this one. I have been stuck for about 5 mins.

Steven Parker
Steven Parker
231,248 Points

Please show your query code so we can see what's happening.

Raymond Moore
seal-mask
.a{fill-rule:evenodd;}techdegree
Raymond Moore
Full Stack JavaScript Techdegree Student 11,174 Points

Hi Steven-

Actually I found out the problem was with syntax within the query. I forgot to place double quotes around the condition string value (e.g. SELECT * FROM books WHERE genre = 'Fantasy' ORDER BY first_published ASC LIMIT 5;)

I placed my initial issue in single quotes within the query. After reviewing a video from the basic SQL I then changed it to (i.e genre = "Fantasy").

However, thanks for the quick response :) Ray

1 Answer

Steven Parker
Steven Parker
231,248 Points

This is very strange, single quotes are actually correct for string literals, but double quotes are also accepted in some situations. For more details see this SQLite documentation page.

So I tried pasting your initial query (with the single quotes) directly into the challenge ... and it passed!

I can only think that there may have also been a typo that got fixed when you changed the quotes, but in any case, congratulations on resolving your issue. :+1: