16. Staff who live in Woodridge

easy

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

Expected results

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.



More SELECT, WHERE, AND, OR, ORDER BY, LIMIT questions

ID Title Level FTPR
212 Top issuing bank by category visa hard -
211 High spenders by issuer visa easy -
210 Issuer and merchant report visa easy -
200 Last week's absent students snap medium -
175 Employees' email account amazon easy
11%
152 Salary analysis dropbox easy
23%
126 Top 3 restaurants uber hard
9%
111 Second most popular product amazon medium
14%
92 Acceptance rate first week of 2021 spotify easy
14%
17 GROUCHO WILLIAMS’ actor_id easy
65%
4 Staff without a profile image easy
67%
3 Top 5 shortest movies easy
53%
2 Top 3 movie categories by sales easy
47%
1 Top store for movie sales easy
30%