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 trialCosmin Iuga
2,352 PointsHello again.
Does this one make more sense? SELECT street||", "|| city|| ", "|| state||", "|| zip||". "|| country AS "address" FROM addresses;
Thank you again.
3 Answers
KRIS NIKOLAISEN
54,971 PointsThere is no comma after state
Ian Hawe
Courses Plus Student 10,579 PointsHi 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
30,164 PointsJust a friendly reminder Cosmin, try not to juggle multiple conversations in the Community Forum
If you don't get an answer immediately try reading and searching for the same questions through the search bar or the filter by subject dropdown