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

can you help me with this issue

In the library database, how many books are with the author of "J.K. Rowling"? Alias the result as jk_book_count. The books table has the columns id, title, author, genre and first_published.

2 Answers

Steven Parker
Steven Parker
231,269 Points

To facilitate analysis and an accurate answer, always show your complete query code, and provide a link to the course page you are working with.

But as a generic hint, people have previously had trouble with this task if they overlook the fact that there is a space between "J.K." and "Rowlling" (or if they omit either of the periods).

sorry here is my code SELECT COUNT(*) AS jk_book_count FROM books WHERE author = "J.K.Rowling";

Steven Parker
Steven Parker
231,269 Points

As I hinted already, it looks like you omitted that space between "J.K." and "Rowlling"!

SELECT COUNT(*) AS jk_book_count FROM books WHERE author = "J.K.Rowling";  -- your code
SELECT COUNT(*) AS jk_book_count FROM books WHERE author = "J.K. Rowling"; -- passing code

sorry master it was not the problem

Steven Parker
Steven Parker
231,269 Points

I'm pretty sure it is, I pasted your code directly into the challenge, and when I added the space it passed.