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

No Explanation for this Task? What's up?

I have tried about 10 possible solutions with no luck. This is the latest I've tried:

SELECT title, author FROM books WHERE LOWER(title) = "lowercase_title" + UPPER(author) = "uppercase_author";

Challenge Task 1 of 2

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.

I really wish these video teachers would do a better job at walking through the process to come up with solutions. They don't need to give the answers but at least demo the process. No where did it show combining LOWER and UPPER along with aliasing items.

Kind of sad to have to spend so much time without resolution. Even the "cheat sheet" is useless.

Anyone have any ideas?

5 Answers

SELECT LOWER(title) AS lower_case_title, UPPER(author) AS upper_case_author FROM books;
Lax Shah
Lax Shah
546 Points

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

WHAT is wrong in this?

Hannes Erlandsson
Hannes Erlandsson
7,249 Points

Did you type it correctly Mr. Friberg?

Hmm, sorry jcorum, I receive after trying your code .... Bummer: Your query didn't retireve all the books with just the lowercase_title first and the uppercase_author second.

challenge 1

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

The right answer should be as shown below:

SELECT LOWER(title) AS "lowercase_title", UPPER(author) AS "uppercase_author" FROM books;

Thanks jcorum. I could have sworn that I tried that and it didn't work. I may have put the uppercase_author and lowercase_title in "".