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 Challenge Task 2 of 2

You say: In an ecommerce database there's a customers table. There is an id, nickname, street, city, state, zip, country and user_id columns. Concatenate the street, city, state, zip and country in the following format. Street, City, State Zip. Country e.g. 34 NE 12 st, Portland, OR 97129. USA. Alias the concatenated string as address

What I entered:

SELECT street || ", " || city || ", " || state || " " || zip AS address FROM customers;

Your error message:

SQL Error: no such column: street

I also tried street_address and streetAddress No go.

Yup, getting this too.

It seems to freak out once the exercise is retried as well.

This is the error I receive when I enter a similar statement: select street ||', '||city||', '||state||' '||zip||'. '||country AS address from customers;

Bummer! Error seeding database: Error: near line 1: table campaigns already exists Error: near line 4: table customers already exists Error: near line 11: table addresses already exists Error: near line 19: table products already exists Error: near line 26: table orders already exists Error: near line 34: PRIMARY KEY must be unique Error: near line 35: PRIMARY KEY must be unique Error: near line 36: PRIMARY KEY must be unique Error: near line 37: PRIMARY KEY must be unique Error: near line 38: PRIMARY KEY must be unique Error: near line 39: PRIMARY KEY must be unique Error: near line 40: PRIMARY KEY must be unique Error: near line 41: PRIMARY KEY must be unique Error: near line 42: PRIMARY KEY must be unique Error: near line 43: PRIMARY KEY must be unique Error: near line 44: PRIMARY KEY must be unique Error: near line 45: PRIMARY KEY must be unique Error: near line 46: PRIMARY KEY must be unique Error: near line 47: PRIMARY KEY must be unique Error: near line 48: PRIMARY KEY must be unique Error: near line 49: PRIMARY KEY must be unique Error: near line 50: PRIMARY KEY must be unique Error: near line 51: PRIMARY KEY must be unique Error: near line 52: PRIMARY KEY must be unique Error: near line 53: PRIMARY KEY must be unique Error: near line 54: PRIMARY KEY must be unique Error: near line 55: PRIMARY KEY must be unique Error: near line 56: PRIMARY KEY must be unique Error: near line 57:

I was also experiencing time out issues.

2 Answers

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

Apologies. This one slipped through the QA net. I've updated the code challenge to have the current table name - it's not customers it's addresses.

Sorry for the inconvenience!

Seems to work now, cheers Andrew!

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Tagging Andrew Chalkley

The first attempt (with I believe the correct query) returns The SQL error that the column "street" does not exist. The second and subsequent attempts return the very long 'freak out' error.

Please advise.

:dizzy: