Ga naar inhoud

Header

Retrieving Data with SELECT

1. Retrieve all data from all actors

Complete the following query to obtain all data from the actors table.

Header

  • Use the SELECT and FROM statements.
SELECT
  ...
FROM
  ...




2. Retrieve the number of actors

Complete the following query to calculate the number of rows (number of actors) in the actors table.

You should see a number as a result.

  • Use the SELECT and FROM statements.
  • Use the COUNT() function.
SELECT
  ...(*)
FROM
  ...;




3. Retrieve first and last names of actors

Complete the following query to obtain data from the first_name and last_name columns from the actors table.

  • Use the SELECT and FROM statements.
SELECT
  ...
...
  ...;




4. Retrieve unique first names

Complete the following query to obtain unique values from the first_name column from the actors table.

  • Use the SELECT and FROM statements.
  • Use the DISTINCT statement.
SELECT
  ...
...
  ...;




5. (Extra) Retrieve the number of unique first names

Create a query to calculate the number of unique first names in the actors table.

...