easyMultiple ChoiceObjective-mapped
FC0-U71 Practice Question: A user runs a query on a database table and…
A user runs a query on a database table and notices that the results contain duplicate rows. Which SQL keyword would eliminate these duplicates?
⚠ Common exam trap
CompTIA often tests the misconception that GROUP BY can eliminate duplicates on its own, but candidates must remember that GROUP BY is for aggregation and can still return duplicate rows if no aggregate function is applied to non-grouped columns.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
DISTINCT
The DISTINCT keyword in SQL is used within a SELECT statement to remove duplicate rows from the result set. When a query returns multiple identical rows, DISTINCT filters them out so that only unique combinations of column values are displayed. This directly addresses the user's requirement to eliminate duplicate rows.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
DISTINCT
Why this is correct
DISTINCT ensures the result set contains only unique rows.
- ✗
GROUP BY
Why it's wrong here
GROUP BY groups rows, but without aggregate functions it may not eliminate duplicates in the way DISTINCT does.
- ✗
WHERE
Why it's wrong here
WHERE filters rows based on conditions but does not eliminate duplicates.
- ✗
ORDER BY
Why it's wrong here
ORDER BY sorts the result set but does not remove duplicates.
Go deeper
Related to this question
About these practice questions
One of 988 original FC0-U71 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.