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

Youssef Zaki
Youssef Zaki
7,768 Points

Code is Right but gives an error?

SELECT title,LENGTH(title) FROM books ORDER BY LENGTH(title) DESC LIMIT 1 ;

My code gets the right result , but it's still give me an Error ?

Bummer! Your query didn't retireve the longest book title with it's length.

https://teamtreehouse.com/library/reporting-with-sql/working-with-text/getting-the-length-of-a-string

Umesh Ravji
Umesh Ravji
42,386 Points

You are missing part of the questions requirements, other than that you're all good :)

Alias the result of the length calculation to be longest_length.

1 Answer

Steven Parker
Steven Parker
231,140 Points

:point_right: You forgot the name for the length column.

The challenge asks: "Alias the result of the length calculation to be longest_length." You have the correct data selected, just add the alias to the column displaying the length.