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

Diego Herrera
Diego Herrera
3,273 Points

Need help with SQL basics

We're back in our e-commerce database. There's a products table with the columns id, name, description and price. Can you retrieve both the name and description aliased as "Product Name" and "Product Description".

i answered: SELECT name AS "Product name", description AS 'Product Description'FROM products;

Why is it wrong?

2 Answers

Hi Diego,

You have everything right but remember that for the challenges the requirements are very specific.

Here, make your query more consistent by having just double quotes(") or just single quotes('), like this:

SELECT name AS "Product Name", description AS "Product Description" FROM products;

Cheers!

Nicholas Grenwalt
Nicholas Grenwalt
46,626 Points

Try capitalizing "Name" in "Product Name" and make sure you are using double quotes around Product Description and also add a space after it before FROM and that should do the trick. So:

SELECT name AS "Product Name", description AS "Product Description" FROM products;