Databases Reporting with SQL Working with Text Getting the Length of a String

Abiel Ortega
Abiel Ortega
2,170 Points

I don't see whats wrong

I don't see what's wrong with the code I presented its correct I know it is but it shows I'm not right that its wrong. So Idk what to do

1 Answer

Moosa Bonomali
Moosa Bonomali
6,090 Points

Here is how I implemented it;

SELECT title, MAX(LENGTH(title)) as longest_length from books
Abiel Ortega
Abiel Ortega
2,170 Points

Thank you so much, in the end, I figured it out just now I tested it out and I came out with this

SELECT title, LENGHT(title) AS longest_length FROM books ORDER BY longest_length DESC LIMIT 1;

This actually really worked and came out right. I also tried it in the workspace and it came out all good

THANK YOU!!!