Module 3: Data Cleaning with SQL Answers (Part 3: Q31–45)

This is Part 3 of the Module 1 quiz answers for “Data Cleaning with SQL ” from the Google Data Analytics Professional Certificate on Coursera.

Here, we’ll walk through questions 31 to 45 with detailed explanations to support your learning.

To find answers to the remaining questions, check out the full module breakdown below:

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

  • Boolean
  • Float ✅
  • Integer
  • String

Explanation:
A float is used for numbers with decimal points.

32. 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

Explanation:
CAST(column AS INTEGER) changes the data type from float to int, useful when decimal precision isn’t needed.

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

  • CAST
  • COALESCE
  • TRIM
  • CONCAT ✅

Explanation:
The CONCAT function is used to join or add strings together, which is useful for creating unique keys from multiple text columns.

34. 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. ✅

Explanation:
SQL is powerful for pulling, integrating, and versioning data.

35. 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 ✅

Explanation:
The INSERT INTO command is used to add new rows of data into an existing table.

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

  • String
  • Float
  • Integer
  • Boolean ✅

Explanation:
In SQL, TRUE/FALSE values are represented as the Boolean data type.

37. 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

Explanation:
SQL is built for performance and scale — handling huge datasets efficiently.

38. 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

Explanation:
Spreadsheets are intuitive and fast for inspecting small datasets manually.

39. 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

Explanation:
Use INSERT INTO to input new records after import.

40. 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

Explanation:
Using LENGTH(state) > 3 filters such states, and the first row returns “Dublin”.

41. In SQL databases, what function can be used to convert data from one datatype to another?

  • CAST ✅
  • LENGTH
  • TRIM
  • SUBSTR

Explanation:
CAST(value AS new_type) lets you change data types.

42. After a company merger, a data analyst receives a dataset with billions of rows of data. They need to leverage this data to identify insights for upper management. What tool would be most efficient for the analyst to use?

  • Spreadsheet
  • Word processor
  • SQL ✅
  • CSV

Explanation:
SQL is the go-to for big data analysis due to efficiency and power.

43. 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. The state names are abbreviated. You want to check for state names that are greater than 2 characters long.

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

What country is in row 1 of your query result?

NOTE: The query index starts at 1 not 0.

  • Ireland ✅
  • India
  • France
  • Chile

Explanation:
Again, LENGTH(state) > 2 filters these, and the first result is “Ireland”.

44. You are working with a database table that contains employee data. The table includes columns about employee location such as city, state, country, and postal_code. You use the SUBSTR function to retrieve the first 3 characters of each last_name, and use the AS command to store the result in a new column called new_last_name.

You write the SQL query below. Add a statement to your SQL query that will retrieve the first 3 characters of each last_name and store the result in a new column as new_last_name.

NOTE: The three dots (...) indicate where to add the statement.

NOTE: SUBSTR takes in three arguments being column, starting_index, ending_index

What employee ID number is in row 8 of your query result?

NOTE: The query index starts at 1 not 0.

  • 7
  • 3
  • 1 ✅
  • 8

Explanation:
Using SUBSTR(last_name, 1, 3) AS new_last_name gets initials. Row 8 has employee ID 1.

45. A data analyst runs a SQL query to extract some data from a database for further analysis. How can the analyst save the data? Select all that apply.

  • Download the data as a spreadsheet. ✅
  • Use the UPDATE query to save the data.
  • Create a new table for the data. ✅
  • Run a SQL query to automatically save the data.

Explanation:
Analysts typically download query results or save them into a new table — not with UPDATE.

Hope this helped! Use the buttons below to move to the previous or next part.

Leave a Reply