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

SQL basics: Categorizing your output with 'AS'

Hello everyone,

I am working on SQL basics with Adrew Chalkley. In the code challenge Categorizing your output with "AS" I ran into an error. The question is as follows:

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".

MY CODE: select name as Product Name, description as "Product Description" from products;

Although I am running my code both capitalized and uncapitalized and im still getting an error. Not sure if its an error in code or the code challenge. Any help would be much appreciated.

Thanks in advance!

2 Answers

Hi Karrerah,

It looks like you didn't put quotes around Product Name like you did with "Product Description"

Since it's 2 words, it would need quotes.

In regards to capitalizing, you should match how it looks in the instructions which it looks like you have that part right.

Hi Jason, Looks like that definitely took care of the problem. Thanks so much!