Graded Quiz: Basic SQL :Databases and SQL for Data Science with Python (IBM Data Analyst Professional Certificate) Answers 2025
1. Question 1
Result of:
-
✅ LEON
PAUL
JOE -
❌ LEON, PAUL, LEON, JOE
-
❌ Repeated names
-
❌ Full names with last names
Explanation:
DISTINCT FIRSTNAME returns each unique FIRSTNAME once, without duplicates.
2. Question 2
SQL:
-
❌ Changes Brewster → Smith
-
❌ Updates all rows to Brewster
-
❌ Updates all rows to Smith
-
✅ Changes the last name of all instructors named ‘Smith’ to ‘Brewster.’
Explanation:
WHERE LASTNAME = 'Smith' filters only those rows.
3. Question 3
Effect of:
(no WHERE clause)
-
❌ Error
-
✅ Removes all entries, leaving an empty table
-
❌ Deletes only first entry
-
❌ Deletes the table
Explanation:
DELETE without WHERE = delete all rows, but table structure remains.
4. Question 4
Result of:
-
❌ Only the distinct names
-
❌ Distinct names + count
-
❌ Error
-
✅ Number of unique FIRSTNAME entries
Explanation:
COUNT(DISTINCT column) gives how many unique values exist.
5. Question 5
Result of:
-
❌ First 5 rows of whole table
-
❌ Last 5 rows
-
❌ Last 5 entries where LASTNAME=’Smith’
-
✅ First 5 entries where LASTNAME = ‘Smith’
Explanation:
LIMIT 5 returns the first 5 matching rows.
🧾 Summary Table
| Q | Correct Answer | Key Concept |
|---|---|---|
| 1 | LEON, PAUL, JOE | DISTINCT returns unique values |
| 2 | Smith → Brewster | UPDATE with WHERE |
| 3 | Table emptied, not deleted | DELETE without WHERE |
| 4 | Count of unique FIRSTNAME | COUNT(DISTINCT) |
| 5 | First 5 Smith rows | LIMIT filtering |