Could someone pls tell me whats wrong with this statement.
Please tell me whats wrong with this SQL statement.
KRIS NIKOLAISENPro Student 50,933 Points
You will want to order by
longest_length instead of the
SELECT title, LENGTH(title) AS longest_length FROM books ORDER BY length DESC LIMIT 1;
Kiran Kumar4,754 Points
There's no column called length in the table, books; Like Kris explained above use the alias, longest_length which contains length of title.