Carol Garcia1,875 Points
What am I doing wrong in this query?
Below is my code:
SELECT title, LENGTH(title) AS longest_length FROM books ORDER BY title, length DESC LIMIT 1;
Jennifer NordellTreehouse Staff
Hi, Carol Garcia ! It looks like you're doing terrific thus far! The problem is in your
ORDER BY. You just made an alias for the length of the title together with the title and named it
longest_length. This is what you should be ordering by
Try changing this part:
ORDER BY title, length
ORDER BY longest_length
Hope this helps!
Tommy Gebru29,951 Points
I believe "longest_length" is only an alias for one parameter, consider also that your alias will replace the column description, so you can count out how many columns are displayed as well