By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Filtering is the process of selecting, sorting, or removing data, content, or information based on specific criteria or rules. This topic appears in exams to test your ability to apply these rules accurately and efficiently.
Filtering is a crucial skill in various fields, including data analysis, software development, and quality control. It appears in exams such as the Certified Data Analyst (CDA) and the Certified Software Development Associate (CSDA) exams. Filtering typically carries 20-30% of the total marks and tests your understanding of the underlying logic and rules.
To master filtering, you must understand the following core concepts:
Before tackling filtering, you should have a solid understanding of:
The primary rule of filtering is:
Sub-rules and exceptions include:
Intermediate
The following rules and formulas are essential for filtering:
Question: Filter the list of employees who are older than 30 and earn more than $50,000.Criteria: Age > 30, Salary > $50,000 Attributes: Age, Salary Operators: AND Data types: Numerical
Step-by-step solution:
Question: Filter the list of customers who have purchased products in the last 6 months and have a credit score above 700.Criteria: Purchase date > 6 months ago, Credit score > 700 Attributes: Purchase date, Credit score Operators: AND Data types: Date, Numerical
Question: Filter the list of employees who are either older than 40 or earn more than $75,000, but not both.Criteria: Age > 40 OR Salary > $75,000, NOT (Age > 40 AND Salary > $75,000) Attributes: Age, Salary Operators: OR, NOT Data types: Numerical
Mistake: Using the AND operator instead of the OR operator.Wrong answer: List of employees who are older than 30 and earn more than $50,000.Correct approach: Use the OR operator to combine the criteria.
Mistake: Using a numerical operator on a date attribute.Wrong answer: List of employees who are older than 30 and earn more than $50,000.Correct approach: Use a date operator on the date attribute.
Mistake: Using a wildcard to match a single character.Wrong answer: List of employees who have a name starting with "A".Correct approach: Use a wildcard to match multiple characters (e.g., *).
Mistake: Using a case-sensitive filter on a case-insensitive attribute.Wrong answer: List of employees who have a name starting with "A".Correct approach: Use a case-insensitive filter on the attribute.
Mistake: Using the NOT operator to negate a criterion that is already false.Wrong answer: List of employees who are older than 30 and earn more than $50,000.Correct approach: Use the NOT operator to negate a criterion that is already true.
Use the AND operator to combine multiple criteria, even if they are not mutually exclusive.
Use the OR operator to combine multiple criteria, even if they are mutually exclusive.
Use the NOT operator to negate a criterion that is already true.
Question: Which of the following criteria would select employees who are older than 30 and earn more than $50,000? A) Age > 30 AND Salary > $50,000 B) Age > 30 OR Salary > $50,000 C) Age > 30 AND Salary < $50,000 D) Age < 30 AND Salary > $50,000
Correct answer: A) Age > 30 AND Salary > $50,000 Explanation: The AND operator is used to combine multiple criteria.Why the distractors are tempting: B) Age > 30 OR Salary > $50,000 is a plausible answer, but it would select employees who are older than 30 or earn more than $50,000, but not both.
Question: Which of the following criteria would select customers who have purchased products in the last 6 months and have a credit score above 700? A) Purchase date > 6 months ago AND Credit score > 700 B) Purchase date < 6 months ago OR Credit score > 700 C) Purchase date > 6 months ago OR Credit score < 700 D) Purchase date < 6 months ago AND Credit score < 700
Correct answer: A) Purchase date > 6 months ago AND Credit score > 700 Explanation: The AND operator is used to combine multiple criteria.Why the distractors are tempting: B) Purchase date < 6 months ago OR Credit score > 700 is a plausible answer, but it would select customers who have purchased products in the last 6 months or have a credit score above 700, but not both.
Question: Which of the following criteria would select employees who are either older than 40 or earn more than $75,000, but not both? A) Age > 40 OR Salary > $75,000, NOT (Age > 40 AND Salary > $75,000) B) Age > 40 AND Salary > $75,000 C) Age < 40 OR Salary < $75,000 D) Age < 40 AND Salary < $75,000
Correct answer: A) Age > 40 OR Salary > $75,000, NOT (Age > 40 AND Salary > $75,000) Explanation: The OR operator is used to combine multiple criteria, and the NOT operator is used to negate the combined criterion.Why the distractors are tempting: B) Age > 40 AND Salary > $75,000 is a plausible answer, but it would select employees who are older than 40 and earn more than $75,000, but not both.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.