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 Reporting with SQL Working with Text Concatenating Text

Cosmin Iuga
Cosmin Iuga
2,352 Points

Hello again.

Does this one make more sense? SELECT street||", "|| city|| ", "|| state||", "|| zip||". "|| country AS "address" FROM addresses;

Thank you again.

3 Answers

There is no comma after state

Ian Hawe
Ian Hawe
Courses Plus Student 10,579 Points

Hi Hopefully this makes things clear,

SELECT is usually followed by your column names

AS is used to create a name for that column in the results

FROM is used to select from a table.

That being said if the table name is 'addresses' and the column names are 'street||"' '|| city|| "' '"|| state||"' and '"|| zip||". "||' then you're fine. If its not try to find the column names in the table 'address' to present your results. Here is an example of what I think you might be looking for:
SELECT street AS Street, city AS City, state AS State, zip AS Zip FROM addresses;

Tommy Gebru
Tommy Gebru
30,164 Points

Just a friendly reminder Cosmin, try not to juggle multiple conversations in the Community Forum :wink:

If you don't get an answer immediately try reading and searching for the same questions through the search bar :eyes: or the filter by subject dropdown :thumbsup: