147k views
3 votes
Write a SELECT statement that joins the Customers table to the Addresses table and returns these columns: first_name, last_name, line1, city, state, zip_code. Return one row for each address for the customer with an email address of allan.sherwood@.

1 Answer

7 votes

Answer:

The select statement to this question can be defined as below:

Statement:

SELECT first_name, last_name,

line1, city, state, zip_Code

FROM Customers JOIN Addresses ON

Customers.CustomerID = Addresses.CustomerID

WHERE Customers.EmailAddress = 'allan.sherwood@.'.

Step-by-step explanation:

Select declaration produces the data as a result of data set from more than one table. This statement collects 0 or even more rows from table, It also provides the view of the table.

  • In the above statement first, we select table columns, that are given in question then we select table and join the columns by using where clause condition.
  • This condition will return the columns with there values.
User Jon Claus
by
5.0k points