Question 16

Staff who live in Woodridge

Instruction
  • Write a query to return the names of the staff who live in the city of 'Woodridge'

Table: staff_list

 col_name | col_type
----------+----------
 id       | integer
 name     | text
 address  | text
 zip code | text
 phone    | text
 city     | text
 country  | text
 sid      | smallint

Sample results

     name
--------------
 Jon Stephens

Solution

postgres
SELECT name 
FROM staff_list 
WHERE city = 'Woodridge';

Explanation

This query is asking the database to retrieve the names of all employees who live in the city of Woodridge. The database is looking in a table called "staff_list" which should contain a list of all employees and their corresponding information such as name, address, and city. The "WHERE" clause is filtering the results to only include employees who live in Woodridge. The output of this query will be a list of employee names who live in Woodridge.

Copied

Last Submission

postgres

No submission yet for this engine. Run and submit your query to save it here.

Copied
Expected results

Submit a query to compare against expected output.