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

Oskar Pihlak
Oskar Pihlak
2,094 Points

Text case

In a library database there's a books table. There's an id, title, author, genre and first_published column. Write a query that will return only the title and author. Bring back the title in lowercase and the author in uppercase. Alias them as lowercase_title and uppercase_author respectively. where to the UPPER and LOWER statements go ?

2 Answers

Final Solution: SELECT LOWER(title) AS lowercase_title, UPPER(author) AS uppercase_author FROM books;

Steven Parker
Steven Parker
231,140 Points

:point_right: The UPPER and LOWER statements go around the columns you want changed.

For example, it says "Bring back the title in lowercase and ... Alias ... as lowercase_title ...", so for that column, you might write:

LOWER(title) AS lowercase_title