17. GROUCHO WILLIAMS’ actor_id

easy

Instruction
  • Write a query to return GROUCHO WILLIAMS' actor_id.
  • Actor's first_name and last_name are all stored as UPPER case in our database, and the database is case sensitive.

Table: actor

  col_name   | col_type
-------------+--------------------------
 actor_id    | integer
 first_name  | text
 last_name   | text

Sample results

 actor_id
----------
      1

Expected results

Solution postgres

SELECT actor_id 
FROM actor 
WHERE first_name = 'GROUCHO' 
AND last_name = 'WILLIAMS';
    

Explanation

This query is selecting the actor_id from the actor table where the first name is 'GROUCHO' and the last name is 'WILLIAMS'. It is likely trying to find a specific actor with those exact names.



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
100%
175 Employees' email account amazon easy
14%
152 Salary analysis dropbox easy
20%
126 Top 3 restaurants uber hard
10%
111 Second most popular product amazon medium
16%
92 Acceptance rate first week of 2021 spotify easy
14%
16 Staff who live in Woodridge easy
65%
4 Staff without a profile image easy
66%
3 Top 5 shortest movies easy
49%
2 Top 3 movie categories by sales easy
42%
1 Top store for movie sales easy
24%