David Corrales4,607 Points
Some small minor error perhaps reporting with SQL, can someone help?
Challenge Task 1 of 1 In the library database there's a books table with the columns id, title, author, genre and first_published.
Find the book with the longest title. Show the title and then the length. Alias the result of the length calculation to be longest_length. Only retrieve the longest book.
Type in your command below, then press Ctrl-Enter.
Bummer: Your query didn't retrieve the longest book title with it's length.
SELECT title, LENGTH(title) AS longest_length FROM books LIMIT 1;
Steven Parker170,459 Points
You're close, and the "LIMIT" does the job of returning just the first result; but it's not necessarily the longest one.
Hint: You might also want to use "ORDER BY".