Week 3 – Cleaning data with SQL – Shuffle Q/A 2

23. You are working with a database table that contains customer data. The table includes columns about customer location such as city, state, country, and postal_code. You want to check for city names that are greater than 9 characters long.

You write the SQL query below. Add a LENGTH function that will return any city names that are greater than 9 characters long.

What is the first name of the customer that is in row 7 of your query result?

NOTE: The query index starts at 1 not 0.

  • Diego
  • Kara
  • Julia
  • Roberto

24. In SQL databases, what data type refers to a number that contains a decimal?

  • Boolean
  • Float
  • Integer
  • String

25. You’re working with a dataset that contains a float column with a significant amount of decimal places. This level of granularity is not needed for your current analysis. How can you convert the data in the float column to be integer data?

  • CAST
  • COALESCE
  • TRIM
  • CONCAT

26. What SQL function lets you add strings together to create new text strings that can be used as unique keys?

  • CAST
  • COALESCE
  • TRIM
  • CONCAT

27. What are some of the benefits of using SQL for analysis? Select all that apply.

  • SQL interacts with database programs.
  • SQL has better user management than spreadsheets.
  • SQL can pull information from different database sources.
  • SQL tracks changes across a team.

28. A data analyst is managing a database of customer information for a retail store. What SQL command can the analyst use to add a new customer to the database?

  • UPDATE
  • CREATE TABLE IF NOT EXISTS
  • DROP TABLE IF EXISTS
  • INSERT INTO

29. In SQL databases, True/False values refers to what data type?

  • String
  • Float
  • Integer
  • Boolean

30. A data analyst is tasked with identifying what orders are still in transit. The current list of orders contains trillions of rows. What is the best tool for the analyst to use?

  • Spreadsheets
  • CSV
  • SQL
  • Word processor

31. Your manager tasks you with analyzing a dataset and visually inspecting the data. Upon initial inspection you realize that this is a small dataset. What tool should you use to analyze the data?

  • CSV
  • Spreadsheet
  • SQL
  • Word processor

Shuffle Q/A 3

32. A data analyst creates a database to store information on the company's customer data. When completing the initial import the analyst notices that they forgot to add a few customers into the table. What command can the analyst use to add these missed customers?

  • ADD
  • APPEND
  • INSERT INTO
  • DROP

33. You are working with a database table that contains customer data. The table includes columns about customer location such as city, state, country, and postal_code. You want to find what state names are greater than 3 characters.

You write the SQL query below. Add a LENGTH function that will return any state names that are greater than 3 characters long.

What state is in row 1 of your query result?

NOTE: The query index starts at 1 not 0.

  • India
  • Chile
  • Dublin
  • Ireland

Devendra Kumar

Project Management Apprentice at Google

Leave a Reply