Module 3 challenge :Process Data from Dirty to Clean (Google Data Analytics Professional Certificate) Answers 2025
Question 1
After a merger, the analyst must handle millions of rows of data efficiently.
✅ SQL
❌ Spreadsheet
❌ Word processor
❌ CSV
Explanation:
SQL (Structured Query Language) is the best tool for managing and analyzing large-scale datasets efficiently. Spreadsheets struggle with performance beyond a few hundred thousand rows.
Question 2
Convert a float column to integers in SQL:
✅ CAST
❌ SUBSTR
❌ LENGTH
❌ TRIM
Explanation:
The CAST() function converts data from one type to another. Example:
SELECT CAST(price AS INT) FROM products;
Question 3
Add a new row of data to a database table:
✅ INSERT INTO
❌ UPDATE
❌ CREATE TABLE IF NOT EXISTS
❌ DROP TABLE IF EXISTS
Explanation:
INSERT INTO adds new data records to a table.
Example:
INSERT INTO products (id, name, price) VALUES (1, 'Laptop', 999);
Question 4
Retrieve the first 2 characters of each product name and call it product_ID:
✅ SUBSTR(product_name, 1, 2) AS product_ID
❌ SUBSTR AS (1, 2 product_name) product_ID
❌ SUBSTR(product_name) AS (1, 2) product_ID
❌ SUBSTR(product_name, 2) AS product_ID
Explanation:
The SUBSTR() function extracts part of a string.
Syntax: SUBSTR(column_name, start_position, length)
Here: starts at position 1, gets 2 characters.
Question 5
Remove trailing spaces from data:
✅ TRIM
❌ FORMAT
❌ AVG
❌ SUBSTR
Explanation:
TRIM() removes leading and trailing spaces from text strings:
SELECT TRIM(name) FROM customers;
Question 6
Return unique computer models without duplicates:
✅ DISTINCT computer_model
❌ DROP computer_model
❌ DUPLICATE computer_model
❌ DELETE computer_model
Explanation:
The DISTINCT clause returns only unique values.
Example:
SELECT DISTINCT computer_model FROM computers;
Question 7
Tidy up a database cluttered with irrelevant tables:
✅ DROP TABLE IF EXISTS
❌ INSERT INTO
❌ UPDATE
❌ CREATE TABLE IF NOT EXISTS
Explanation:
DROP TABLE IF EXISTS deletes a table only if it already exists — helpful for cleanup operations.
Question 8
Check for credit card numbers longer than 16 characters:
✅ LENGTH(credit_card_numbers) > 16
❌ COUNT(credit_card_numbers) > 16
❌ WHERE(credit_card_numbers) < 16
❌ IDENTIFY(credit_card_numbers) < 16
Explanation:
The LENGTH() function counts the number of characters in a string.
Combine with a condition to detect anomalies:
SELECT * FROM payments WHERE LENGTH(credit_card_numbers) > 16;
Question 9
Replace null values in a column with a different column’s value:
✅ COALESCE
❌ TRIM
❌ CONCAT
❌ CAST
Explanation:
COALESCE() returns the first non-null value in a list:
SELECT COALESCE(order_value, backup_value) FROM orders;
🧾 Summary Table
| Q# | ✅ Correct Answer(s) | Key Concept |
|---|---|---|
| 1 | SQL | Best for large datasets |
| 2 | CAST | Convert data types |
| 3 | INSERT INTO | Add new records |
| 4 | SUBSTR(product_name, 1, 2) AS product_ID | Extract substring |
| 5 | TRIM | Remove spaces |
| 6 | DISTINCT | Remove duplicates |
| 7 | DROP TABLE IF EXISTS | Delete tables safely |
| 8 | LENGTH(credit_card_numbers) > 16 | String length check |
| 9 | COALESCE | Replace nulls |