Databases Reporting with SQL Working with Text Concatenating Text

vona goodpaster
vona goodpaster
1,719 Points

need help

In an ecommerce database there's a addresses 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

Select Street || ", " || City || ", " || State || " " || Zip || ". " || Country || AS "address" From addresses;

Bummer: There's something wrong with your SQL statement. Please review your code and try again.

Not sure what im doing wrong

2 Answers

Steven Parker
Steven Parker
205,347 Points

There's a stray extra concatenation symbol ("||") between the last column reference and the "AS" keyword.