31. 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.)

What is the employee ID number of the employee with an email of laura@chinookcorp.com?

  • 8
  • 2
  • 6
  • 4

32. You are working with the Chinook database and are responsible for filtering for the customers that have a value of 'USA' in the country column and have a value of 'Frank' in the firstname column. 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.)

How many customers live in the USA and have the name Frank?

  • 4
  • 1
  • 3
  • 2

33. You need to perform a SQL join. You want to return all the columns with records matching on the device_id column between the employees and machines tables. You also want to return all records from the employees table. Which of the following queries would you use?

  • SELECT *

    FROM employees

    RIGHT JOIN machines ON employees.device_id = machines.device_id;

  • SELECT *

    FROM employees

    INNER JOIN machines ON employees.device_id = machines.device_id;

  • SELECT *

    FROM employees

    FULL OUTER JOIN machines ON employees.device_id = machines.device_id

  • SELECT *

    FROM employees

    LEFT JOIN machines ON employees.device_id = machines.device_id;

34. You are working with the Chinook database. You want to return the lastname and title 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.)

What is the title of the employee with the last name of Callahan?

  • IT Manager
  • IT Staff
  • Sales Manager
  • General Manager

35. You are working with the Chinook database and want to filter on the hiredate column to find all employees hired on or after '2003-10-17' (October 17, 2003). 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.)

How many employees were hired on or after October 17, 2003?

  • 4
  • 2
  • 3
  • 1

36. What is true about the values in the primary key column? Select all that apply.

  • They cannot be null (or empty).
  • They should never contain numeric data.
  • They do not need to be unique.
  • Each row must have a unique value.

37. Both an employees table and a machines table contain an employee_id column, and you want to return only the records that share a value in this column. Which keyword should be part of your query?

  • FULL OUTER JOIN
  • INNER JOIN
  • BETWEEN
  • WHERE

38. Which query returns all records that start with the character 'a' from the name column in the employees table?

  • SELECT name

    FROM employees

    WHERE name = ‘a%’;

  • SELECT name

    FROM employees

    WHERE name LIKE ‘%a’;

  • SELECT name

    FROM employees

    WHERE name LIKE ‘a%’;

  • SELECT name

    FROM employees

    WHERE name LIKE ‘a’;

Leave a Reply