Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Alias in Concatenation Reporting
Hi, in the second question of this challenge I don't quite understand the Aliasing that is happening here.
My code reads as follows:
SELECT Street || ", " || City || ", " || State || " " || Zip || ". " || Country AS "address" FROM addresses;
This is correct, but in the data fields in the table all lead with lower case (street, city, country, etc), and the format asks to concatenate the address as Street, City, Country.
Wouldn't we have to do alias every single of the cells in the dataset for our SQL query?
Like street AS "Street" etc?
Megan AmendolaTreehouse Teacher
The challenge isn't asking you to change the column names to titlecase (street to Street). It is just saying to output the info in the typical address format which is Street, City, State Zip because you capitalize the street names, city names, and states names when you write an address out. It was just using that as an example of the column order. Do you think it would be less confusing if the column names were lowercase instead?