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

Alexandra Iliuta
PLUS
Alexandra Iliuta
Courses Plus Student 3,519 Points

Write a query that will return only the title and author. Bring back the title in lowercase and the author in uppercase.

to me it seems that the database it retrieving the right answer, but i get the message: " Bummer! Your query didn't retrieve all the books with just the lowercase_title first and the uppercase_author second."

Could someone help, please? :)

Cheo R
Cheo R
37,150 Points

I remember getting something similar, but testing somewhere else said my query should have worked.

Try:

  • Retrieving attributes at a time and only those attributes
  • Different queries to retrieve those attributes
  • Build up your queryset by combining previous queries and see if that works.

Which question is it for and what is it looking for?

Steven Parker
Steven Parker
231,271 Points

Please show the answer you submitted.

Then someone can help figure out what you might need to change.

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

You can apply the changes to the format at the same time as you select it.

Try

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

This will ensure you're not returning the same results twice in the same query.

Alexandra Iliuta
PLUS
Alexandra Iliuta
Courses Plus Student 3,519 Points

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

sorry,this is the code. :D