81.7k views
4 votes
you are working with the chinook database. you want to return the employeeid and email columns from the employees table. replace --??? with the missing information to complete the query. (if you want to undo your changes to the query, you can click the reset button.)

2 Answers

3 votes

Final answer:

To return the employeeid and email columns from the employees table in the chinook database, use the SELECT statement with the specified columns.

Step-by-step explanation:

To return the employeeid and email columns from the employees table in the chinook database, you can use the SELECT statement. The query would look like this:

SELECT employeeid, email FROM employees;

This query selects the specified columns (employeeid and email) from the employees table. The result of the query will be a set of rows, with each row containing the employeeid and email values for a particular employee.

User Karthik Saxena
by
9.0k points
4 votes

The SQL query to get this is:

ELECT EmployeeId, Email

FROM employees;

How to explain

This SQL query will retrieve the EmployeeId and Email columns from the employee's table in the Chinook database, providing information about all employees' IDs and their respective email addresses.

The SQL query selects EmployeeId and Email columns from the employee's table in the Chinook database, fetching unique identifiers and corresponding email addresses for all employees stored within the dataset.

The Complete Question

You are working with the Chinook database, specifically the employees table. You want to retrieve the EmployeeId and Email columns for all employees.

Write a SQL query to achieve this.

Chinook Database Schema (simplified):

CREATE TABLE employees (

EmployeeId INTEGER PRIMARY KEY,

FirstName TEXT,

LastName TEXT,

Email TEXT,

-- Other columns present in the table...

);

Data in employees table:

EmployeeId FirstName LastName Email

1 John Smith john.smith at email.com

2 Jane Doe jane.doe at email.com

3 Alice Johnson alice.johnson at email.com

... ... ... ...

User Jacob Lange
by
8.1k points