Courseiva

CCNA Data Querying And Analysis Questions

55 questions · Data Querying And Analysis · All types, answers revealed

1
MCQeasy

A junior data analyst runs the following query against a retail sales table and receives 42,000 rows instead of the expected 12,000: SELECT c.customer_id, c.customer_name, o.order_id FROM customers c LEFT JOIN orders o ON c.customer_id = o.customer_id WHERE o.order_status <> 'cancelled'; Which action should the analyst take to return all customers, including those with no orders, while still excluding cancelled orders?

A.Change the WHERE clause to WHERE o.order_status <> 'cancelled' OR o.order_status IS NULL.
B.Add DISTINCT to the SELECT list to eliminate duplicate customer rows.
C.Replace LEFT JOIN with INNER JOIN and keep the WHERE clause unchanged.
D.Move the o.order_status <> 'cancelled' condition into the ON clause of the LEFT JOIN.
AnswerD

Placing the filter in the ON clause preserves all rows from the left table, so customers with no orders still appear with NULL order values, while cancelled orders are excluded from the join matches. The result set includes every customer and only non-cancelled orders, which matches the stated requirement exactly. Filtering in the WHERE clause instead converts the outer join into an inner join.

Why this answer

In a LEFT JOIN, predicates placed in the WHERE clause are evaluated after the join and remove rows where the right-side column is NULL, effectively turning the outer join into an inner join. Moving the status filter into the ON clause restricts which orders are matched without discarding customers who have no orders. This is the standard fix for returning all customers while excluding cancelled orders.

Exam trap

The trap here is assuming that a WHERE clause filter on the right table of a LEFT JOIN behaves the same as a filter in the ON clause, when it actually eliminates the unmatched left rows.

2
MCQhard

A data analyst is working with a dataset that contains a column with values such as 'N/A', 'null', ' ', and 'unknown'. The analyst needs to count the number of truly missing values in this column. Which approach is most appropriate?

A.Use a query that counts rows where the column = ''.
B.Use a query that counts rows where the column IS NULL.
C.Use a query that counts rows where the column IS NULL OR column IN ('N/A', 'null', 'unknown', ' ').
D.Use a query that counts rows where the column IS NOT NULL.
AnswerC

This approach accounts for both true NULLs and common placeholder strings that represent missing data. By explicitly listing these values in an IN clause along with IS NULL, the analyst captures all instances of missing information. This is the most comprehensive method for counting truly missing values in this dataset.

Why this answer

Missing data can be represented by NULLs or by placeholder strings such as 'N/A', 'null', 'unknown', or blank spaces. To accurately count missing values, the query must include both IS NULL and an IN list of the known placeholders. This ensures all forms of missing data are captured in the count.

Exam trap

The trap here is assuming that missing data is only represented by NULL, ignoring common placeholder strings that also indicate missing values.

3
MCQhard

Which of the following is a limitation of the 'Star Schema' design compared to a fully normalized schema?

A.Inability to store large data volumes
B.Slower query performance
C.Increased data redundancy
D.Difficulty in writing joins
AnswerC

Star schemas denormalise dimension tables into flat structures, so descriptive attributes repeat across fact rows. This deliberate redundancy speeds reads but increases storage and risks inconsistent updates, unlike a fully normalised model where data is stored once and joins reconstruct relationships.

Why this answer

A star schema deliberately denormalizes dimension tables to optimize read performance, which inherently duplicates attribute values across dimension rows and across fact-to-dimension relationships. This redundancy is the accepted trade-off for simpler, faster analytical queries. A fully normalized schema (3NF and beyond) eliminates such duplication by splitting data into many related tables.

Exam trap

DS0-001 often tests the misconception that normalization always improves performance — candidates forget that star schemas trade redundancy for query speed, not the other way around.

How to eliminate wrong answers

Option A is wrong because star schemas are specifically designed to handle very large data volumes in data warehouses and columnar platforms. Option B is wrong because star schemas typically deliver faster query performance than fully normalized schemas due to fewer joins and simpler access paths. Option D is wrong because star schemas actually reduce join complexity — a single fact table joins directly to denormalized dimensions, unlike snowflake or fully normalized designs that require multi-hop joins.

4
Multi-Selecthard

Which TWO of the following actions are considered best practices for maintaining data integrity in a data pipeline?

Select 2 answers
A.Automated schema validation
B.Using only manual entry
C.Hardcoding credentials in scripts
D.Ignoring error logs
E.Logging data quality metrics
AnswersA, E

Automated schema validation catches structural drift—unexpected column additions, type changes or missing fields—before malformed records propagate downstream. It enforces the pipeline's defined contract at ingestion, satisfying the data-integrity requirement by rejecting or quarantining non-conforming batches early, rather than allowing corrupt data to contaminate transformations and reporting.

Why this answer

Automated schema validation (A) is a best practice because it enforces expected data types, column names, and constraints at each pipeline stage, catching malformed or drifted records before they corrupt downstream tables. Logging data quality metrics (E) is also a best practice because it provides continuous observability into completeness, uniqueness, validity, and timeliness, enabling alerting and root-cause analysis when integrity degrades. By contrast, using only manual entry (B) is error-prone and unscalable, hardcoding credentials in scripts (C) is a security anti-pattern that risks unauthorized access and tampering, and ignoring error logs (D) hides failures that would otherwise reveal integrity problems.

Exam trap

DS0-001 often tests the distinction between preventive controls (schema validation) and detective controls (metric logging), tempting candidates to pick only one when the question asks for TWO best practices.

5
Multi-Selecthard

Which THREE of the following represent common data transformation tasks in a preparation workflow?

Select 3 answers
A.Data cleaning
B.Renaming columns
C.Database deletion
D.Data filtering
E.Hardware installation
AnswersA, B, D

Data cleaning is a core transformation task in preparation workflows, resolving duplicates, inconsistencies, missing values and formatting errors before analysis. It satisfies the stem's requirement by standardising raw input into a consistent, usable dataset, which is precisely the transformation work performed between extraction and loading.

Why this answer

Data cleaning (A) is a core transformation task because it fixes missing values, duplicates, outliers, and inconsistent formats so downstream analysis is reliable. Renaming columns (B) is a standard transformation that standardizes schema and improves readability before joining or modeling data. Data filtering (D) is also a transformation task because it selects or excludes rows based on conditions, reducing the dataset to the relevant subset.

Database deletion (C) is an administrative or destructive operation, not a preparation transformation, and hardware installation (E) is an infrastructure task unrelated to data preparation workflows.

Exam trap

DS0-001 often tests the confusion between data transformation tasks and database administration tasks — candidates pick 'database deletion' because it sounds data-related, missing that transformation operates on records, not on the database object itself.

6
MCQeasy

A business analyst is preparing a quarterly sales report and needs to categorize customers into 'High', 'Medium', and 'Low' value tiers based on their total annual spend. The analyst writes a SQL query against a Microsoft SQL Server database and wants to assign the tier label in the result set without modifying the underlying table. Which SQL construct should the analyst use?

A.A HAVING clause that filters customers based on their total spend thresholds.
B.A GROUP BY clause on the total spend column to group customers into tiers.
C.A CASE expression in the SELECT list that evaluates the total spend and returns the tier label.
D.An UPDATE statement that sets a new tier column in the customers table.
AnswerC

A CASE expression evaluates conditions and returns a corresponding value for each row, making it ideal for deriving a tier label based on total spend without altering the table. It can be included directly in the SELECT list, so the original data remains unchanged. This is the standard SQL approach for conditional categorization in a query result.

Why this answer

A CASE expression in the SELECT list allows the analyst to evaluate each customer's total spend and return a tier label such as 'High', 'Medium', or 'Low' without modifying the table. This keeps the database unchanged and provides the required categorization for the report. Other options either modify data, aggregate without labeling, or filter without categorizing.

Exam trap

The trap here is confusing filtering or grouping operations with conditional labeling, when the requirement is to derive a new column value in the query output.

7
Multi-Selecteasy

Which TWO of the following are benefits of using a data warehouse?

Select 2 answers
A.Complete replacement of all source systems
B.Optimization for complex analytical queries
C.Centralized data storage
D.Automated AI decision making
E.Low cost for real-time transactional updates
AnswersB, C

A data warehouse stores data in dimensional, columnar or otherwise query-optimised structures with pre-computed aggregates, so complex analytical queries scan less data than on transactional systems. This directly satisfies the stem's benefit criterion by delivering fast, predictable analytical performance.

Why this answer

Option B is correct because a data warehouse is specifically architected for analytical workloads, using columnar storage, star/snowflake schemas, and MPP engines to efficiently run complex aggregations, joins, and OLAP queries over large historical datasets. Option C is correct because a data warehouse consolidates data from multiple heterogeneous source systems into a single, subject-oriented, integrated repository, giving the enterprise one authoritative version of the truth for reporting and BI. Option A is wrong because a data warehouse complements, rather than replaces, source systems — the OLTP systems remain the systems of record that feed the warehouse via ETL/ELT.

Option D is wrong because a warehouse stores and serves data; it does not itself perform automated AI decision making, which requires separate ML/analytics tooling. Option E is wrong because warehouses are optimized for bulk analytical reads, not low-cost real-time transactional updates, which are the domain of OLTP databases.

Exam trap

DS0-001 often tests the misconception that a data warehouse replaces source systems or handles real-time transactional workloads, when it is designed for analytical reads over centralized historical data.

8
MCQmedium

A data engineer must load a 400 GB Parquet dataset from an object store into a columnar warehouse. The source files are partitioned by date but each partition contains many small files averaging 5 MB. Queries against the loaded table are slow because the warehouse scans far more data than necessary. Which action most directly improves query performance by reducing scanned data?

A.Compact the small files into larger files and ensure the target table is partitioned on the same date column.
B.Convert the Parquet files to CSV before loading to simplify parsing.
C.Increase the warehouse compute cluster size to add more nodes.
D.Compress each 5 MB file with gzip before loading.
AnswerA

Compacting small files reduces per-file overhead and enables more efficient sequential reads, while aligning partitioning with the source date column lets the warehouse prune irrelevant partitions during queries. Together these reduce the volume of data scanned for typical date-filtered queries. This directly addresses the slow scans described in the scenario.

Why this answer

Query latency in columnar warehouses is dominated by how much data must be read and how many files must be opened. Many small files increase metadata and open/close overhead, and a lack of partitioning on the common filter column forces full scans. Compacting files and aligning partitioning with the date column enable partition pruning and efficient columnar reads, directly reducing scanned data.

Exam trap

The trap here is equating raw compute scaling or compression with reduced scanned data, when the actual culprit is file granularity and missing partition alignment.

9
MCQmedium

When performing sentiment analysis on customer feedback, which preprocessing step is most critical to ensure words like 'Running' and 'run' are treated as the same base concept?

A.Stop-word removal
B.Tokenization
C.Feature scaling
D.Lemmatization
AnswerD

Lemmatization maps inflected forms to their dictionary base using vocabulary and morphological analysis, so 'Running' resolves to 'run' rather than the stem 'runn' that stemming produces. This yields identical tokens for sentiment scoring, satisfying the requirement that both forms share one base concept.

Why this answer

Lemmatization or stemming reduces words to their root or base form.

10
MCQmedium

A data analyst is building a report that joins a fact table of retail transactions to a dimension table of products. The product dimension contains a column 'category' that is frequently used in filters, but the analyst notices that many transactions have a NULL category because the product was not properly matched during the ETL load. The analyst wants to ensure that all transactions appear in the report, even when the category is missing, and that missing categories are labeled as 'Uncategorized'. Which SQL join type and function combination should the analyst use?

A.RIGHT JOIN with COALESCE on the category column.
B.FULL OUTER JOIN with COALESCE on the category column.
C.INNER JOIN with COALESCE on the category column.
D.LEFT JOIN with COALESCE on the category column.
AnswerD

A LEFT JOIN returns all rows from the fact table (transactions) and matching rows from the product dimension. When there is no match, the product columns are NULL, but the transaction remains. Wrapping the category column with COALESCE(category, 'Uncategorized') replaces NULL with the desired label, ensuring all transactions appear and missing categories are clearly identified.

Why this answer

Using a LEFT JOIN from the transaction fact table to the product dimension ensures every transaction is retained, even when no product match exists. The COALESCE function then replaces the resulting NULL category with 'Uncategorized', so missing categories are labeled consistently. This combination satisfies both requirements: all transactions appear, and missing categories are clearly identified.

Exam trap

The trap here is selecting a FULL OUTER JOIN to 'include everything', when the requirement is specifically to preserve all fact rows and not introduce unmatched dimension rows.

11
Multi-Selecteasy

Which THREE of the following are common data types in relational databases?

Select 3 answers
A.BOOLEAN
B.PIVOT
C.DASHBOARD
D.VARCHAR
E.INTEGER
AnswersA, D, E

BOOLEAN holds true or false values, a standard relational data type for flags such as active status or consent. It satisfies the question's criterion of being a common data type by representing binary logical states compactly, typically as a single bit or small integer column.

Why this answer

BOOLEAN (A) is a standard relational data type that stores TRUE/FALSE (or NULL) values, commonly used for flags and binary states. VARCHAR (D) is a variable-length character string type that stores alphanumeric text up to a defined maximum length, making it one of the most widely used column types. INTEGER (E) is a numeric data type storing whole numbers, typically used for IDs, counts, and other discrete values.

PIVOT (B) is not a data type but a relational operation/query construct that rotates rows into columns, and DASHBOARD (C) is a reporting/visualization artifact rather than a column data type, so neither belongs in this list.

Exam trap

DS0-001 often tests the confusion between SQL operations (PIVOT) and data types, causing candidates to select non-data-type options like PIVOT or DASHBOARD.

12
Multi-Selectmedium

Which THREE of the following are examples of descriptive statistics?

Select 3 answers
A.Standard deviation
B.Mean
C.Machine learning
D.Median
E.Linear regression
AnswersA, B, D

Standard deviation is a descriptive statistic, quantifying the spread or dispersion of values around the mean. It satisfies the stem's requirement by summarising variability within the collected dataset, not by drawing inferences about a wider population.

Why this answer

Standard deviation (A) is a descriptive statistic because it quantifies the spread or dispersion of a dataset around its mean, summarizing variability without inferring beyond the observed data. The mean (B) is a measure of central tendency that summarizes a dataset by averaging all values, making it a classic descriptive statistic. The median (D) is also a measure of central tendency, representing the middle value of an ordered dataset and summarizing its central position descriptively.

Machine learning (C) is not a descriptive statistic; it is a field of algorithms used for prediction or pattern recognition, often involving inferential or predictive modeling. Linear regression (E) is an inferential/predictive technique that models relationships between variables to estimate or forecast outcomes, not merely to summarize data.

Exam trap

DS0-001 often tests the boundary between descriptive and inferential statistics, tricking candidates into selecting predictive techniques like linear regression or machine learning as if they were summary measures.

13
MCQhard

A report needs to identify the 'top 10' customers by total spend. In SQL, which clause would you use to return only the first 10 results after sorting by spend descending?

A.WHERE
B.LIMIT
C.OFFSET
D.HAVING
AnswerB

LIMIT restricts the result set to a specified number of rows after ORDER BY has sorted spend descending, satisfying the requirement to return only the first 10 customers. It applies after sorting, so the highest spenders are retained rather than an arbitrary subset.

Why this answer

The LIMIT clause restricts the number of rows returned by a query after the result set has been sorted. Combined with ORDER BY spend DESC, LIMIT 10 returns only the top 10 highest-spending customers. WHERE filters rows before aggregation/sorting, OFFSET skips rows, and HAVING filters grouped results — none of these cap the row count.

Exam trap

DS0-001 often tests whether candidates confuse row-filtering clauses (WHERE, HAVING) with result-set-limiting clauses (LIMIT, TOP, FETCH FIRST), so the trap is picking WHERE because it 'filters' results.

How to eliminate wrong answers

Option A is wrong because WHERE filters individual rows based on a condition before sorting or grouping occurs; it cannot restrict the result set to a fixed number of rows. Option C is wrong because OFFSET skips a specified number of rows at the start of the result set rather than limiting how many rows are returned. Option D is wrong because HAVING filters the output of GROUP BY aggregations (e.g., HAVING SUM(spend) > 1000), not the total row count of a sorted result.

14
MCQhard

An analyst is using a CTE (Common Table Expression) to pre-aggregate sales data before performing a join. What is the primary benefit of using a CTE instead of a subquery in this scenario?

A.Better readability and recursive capability
B.Automatic indexing of the result set
C.Performance is always superior to subqueries
D.Lower memory consumption during execution
AnswerA

A CTE names the pre-aggregated result set, separating it from the join logic so the query reads top-down and is easier to maintain. It also supports recursion, unlike a plain subquery, which satisfies the readability and recursive capability requirement.

Why this answer

CTEs (WITH clauses) improve query readability by naming intermediate result sets and, unlike most subqueries, support recursion via WITH RECURSIVE — essential for hierarchical data like org charts or bill-of-materials. In the pre-aggregation scenario, the CTE makes the aggregation step explicit and self-documenting, and it can be referenced multiple times in the outer query.

Exam trap

DS0-001 often tests the misconception that CTEs are always faster or auto-indexed, when their primary advantages are readability, reusability, and recursion — not guaranteed performance gains.

How to eliminate wrong answers

Option B is wrong because a CTE does not automatically create indexes on its result set — it is a named query, not a materialized table, and any indexing must be done on the underlying tables. Option C is wrong because performance is not always superior; many optimizers inline CTEs identically to subqueries, and in some engines (older PostgreSQL versions) CTEs were optimization fences that could hurt performance. Option D is wrong because memory consumption depends on the execution plan and engine — CTEs are not inherently more memory-efficient than subqueries.

15
Multi-Selectmedium

Which THREE of the following are types of data joins in SQL?

Select 3 answers
A.INNER JOIN
B.UPPER JOIN
C.LEFT JOIN
D.RIGHT JOIN
E.FAST JOIN
AnswersA, C, D

INNER JOIN returns only rows with matching keys in both tables, making it one of SQL's core join types. The stem asks for join types, and INNER JOIN is a distinct, standard category alongside LEFT, RIGHT and FULL OUTER joins.

Why this answer

INNER JOIN (A) is a core SQL join type that returns only rows where the join condition matches in both tables, making it one of the standard join categories. LEFT JOIN (C) is also a standard SQL join that returns all rows from the left table plus matching rows from the right table, filling unmatched right-side columns with NULL. RIGHT JOIN (D) is the mirror of LEFT JOIN, returning all rows from the right table plus matches from the left, and is likewise a recognized SQL join type.

The other options are not valid SQL joins: UPPER JOIN (B) is not a SQL keyword (UPPER is a string function), and FAST JOIN (E) is not a defined join type in standard SQL or major RDBMS implementations.

Exam trap

DS0-001 often tests recognition of valid SQL join types versus fabricated ones like 'UPPER JOIN' or 'FAST JOIN', catching candidates who are unfamiliar with the standard join syntax.

16
MCQmedium

When working with time-series data, what does a 'lag' feature represent in an analysis?

A.The time taken to query the data
B.The difference between two time stamps
C.The value of a variable from a previous period
D.The sampling rate of the sensors
AnswerC

A lag feature shifts a variable's values backward by a defined number of time steps, so each observation carries the value from an earlier period. This exposes temporal dependence to the model, letting it learn autocorrelation and trends rather than treating each timestamp as independent.

Why this answer

In time-series analysis, a lag feature is a copy of a variable's value shifted back by one or more time periods, so the model can use past observations to predict current or future values. For example, lag-1 of daily sales is yesterday's sales value aligned to today's row. This is fundamental to autoregressive models and feature engineering for forecasting.

Exam trap

DS0-001 often tests the distinction between a lag (a shifted past value of the same variable) and a time delta (the difference between two timestamps), which sound similar but serve completely different modeling purposes.

How to eliminate wrong answers

Option A is wrong because query execution time is a performance metric, not a feature derived from the temporal structure of the data. Option B is wrong because the difference between two timestamps is a duration or delta (e.g., time since last event), which is a different engineered feature, not a lag. Option D is wrong because sampling rate describes how frequently sensor readings are captured (e.g., 1 Hz), which is metadata about collection frequency, not a shifted value of a variable.

17
Multi-Selectmedium

Which TWO of the following are legitimate ways to optimize SQL query performance?

Select 2 answers
A.Using a single large table
B.Selecting all columns (SELECT *)
C.Creating indexes on frequently filtered columns
D.Replacing subqueries with JOINs where possible
E.Deleting all system statistics
AnswersC, D

Indexes on frequently filtered columns let the optimiser seek directly to matching rows instead of scanning the whole table, cutting I/O for WHERE, JOIN and ORDER BY predicates. This satisfies the stem's demand for a legitimate query-performance optimisation.

Why this answer

Option C is correct because creating indexes on frequently filtered columns (those used in WHERE, JOIN, and ORDER BY clauses) allows the database engine to locate rows via B-tree or hash lookups instead of full table scans, dramatically reducing I/O and query time. Option D is correct because replacing subqueries with JOINs where possible lets the optimizer build a single, more efficient execution plan, often avoiding repeated subquery evaluation (especially correlated subqueries) and enabling better use of indexes and join algorithms. Option A is wrong because consolidating data into a single large table increases scan costs, worsens contention, and prevents proper normalization and partitioning.

Option B is wrong because SELECT * retrieves unnecessary columns, increasing I/O, memory, and network overhead and preventing covering-index optimizations. Option E is wrong because deleting system statistics removes the optimizer's cardinality and distribution data, leading to poor execution plans and degraded performance.

Exam trap

DS0-001 often tests whether candidates recognize that SELECT * and denormalization are anti-patterns for performance, and that deleting statistics harms the optimizer — the trap is picking options that sound like simplifications but actually degrade query performance.

18
MCQeasy

In Power BI, which visualization component is best suited to show the relationship between two numerical variables and identify potential trends or clusters?

A.Gauge Chart
B.Scatter Plot
C.Pie Chart
D.Clustered Column Chart
AnswerB

A scatter plot places one numerical variable on each axis, so each point represents a paired observation. This reveals correlation, trends, and clusters between the two measures, which bar, line, and pie charts cannot show because they plot a single measure against categories or time.

Why this answer

A scatter plot plots each data point on a two-dimensional plane using two numerical axes, making it the ideal visualization to reveal correlation, trends, clusters, and outliers between two numerical variables. Power BI's scatter chart also supports a category/legend field and a size field for bubble charts, extending its analytical power.

Exam trap

DS0-001 often tests whether candidates can match visualization types to analytical intent — scatter plots for correlation between two numerical variables, versus pie/column charts for categorical composition, which are common distractors.

How to eliminate wrong answers

Option A is wrong because a gauge chart displays a single value against a target range (e.g., KPI progress) and cannot show relationships between two variables. Option C is wrong because a pie chart shows part-to-whole proportions of a single categorical measure and cannot represent two numerical axes. Option D is wrong because a clustered column chart compares categorical values across groups, not the correlation between two continuous numerical variables.

19
MCQmedium

When creating an ETL pipeline, which stage involves validating that the data meets business rules (e.g., age must be positive)?

A.Extraction
B.Loading
C.Reporting
D.Transformation
AnswerD

Transformation applies business rules, cleansing and validation to extracted data before it is loaded, so checks such as age being positive are enforced here. Extraction only retrieves source data and loading writes it to the target, neither of which validates business rules.

Why this answer

The Transformation stage is where data is cleansed, standardized, and validated against business rules before loading into the target system. Checking that age is positive, that dates fall within valid ranges, or that codes match a reference list are all transformation-layer validations. Extraction only pulls raw data, and Loading only writes it to the destination.

Exam trap

DS0-001 often tests confusion between structural validation (schema/type checks at extract or load) and semantic business-rule validation, which belongs to the Transformation stage.

How to eliminate wrong answers

Option A is wrong because Extraction is purely about reading data from source systems (databases, APIs, flat files) — no business rules are applied at this stage. Option B is wrong because Loading writes already-transformed data into the target warehouse or data store; validation has already occurred upstream. Option C is wrong because Reporting is a downstream consumption activity that queries the loaded data, not a pipeline stage that enforces business rules.

20
Multi-Selectmedium

Which THREE of the following SQL aggregate functions are commonly supported in most relational databases?

Select 3 answers
A.SUM
B.CONCAT
C.AVG
D.SUBSTR
E.COUNT
AnswersA, C, E

SUM totals numeric values across rows, satisfying the stem's requirement for a widely supported aggregate. It is part of the SQL standard and implemented across virtually all relational databases, including SQL Server, Oracle, PostgreSQL and MySQL. This ubiquity confirms it as one of the three commonly supported functions the question demands.

Why this answer

SUM, COUNT, and AVG are fundamental aggregate functions supported across virtually all SQL standards.

21
MCQeasy

Which dashboarding practice helps prevent users from being overwhelmed by too much data at once?

A.Removing all tooltips
B.Using interactive filters
C.Adding more charts per page
D.Increasing font size
AnswerB

Interactive filters let users narrow the displayed dataset to the dimensions and ranges they need, so the dashboard presents only relevant subsets rather than every record at once. This directly reduces cognitive overload while preserving access to the full underlying data.

Why this answer

Interactive filters let users narrow the dataset to what is relevant to them, reducing cognitive overload and preventing the dashboard from displaying every metric at once. This is a core dashboard design principle: progressive disclosure through filtering, slicing, and drill-down. It keeps the initial view clean while still giving access to detail on demand.

Exam trap

DS0-001 often tests dashboard usability principles, so the trap is choosing options that sound like 'improvements' (more charts, bigger fonts) but actually increase cognitive load.

How to eliminate wrong answers

Option A is wrong because removing all tooltips reduces the ability to get contextual detail on hover, which can actually increase confusion rather than reduce data overload. Option C is wrong because adding more charts per page increases visual clutter and cognitive load, the opposite of the goal. Option D is wrong because increasing font size does not reduce the amount of data shown; it may even crowd the layout and make the dashboard harder to scan.

22
MCQhard

A data engineer is profiling a customer table and finds that the 'email' column contains 12% NULL values, while the 'customer_id' column is fully populated and unique. The business rule states that every customer record must have a valid email address. Which action should the engineer take to enforce this rule in the pipeline?

A.Drop the email column from the customer table and rely on customer_id for identification.
B.Implement a validation rule that quarantines records with NULL or malformed email addresses for remediation.
C.Replace NULL email values with a default placeholder such as 'unknown@example.com' and load the rows.
D.Add a NOT NULL constraint to the email column and reject rows that fail the constraint.
AnswerB

Quarantining records with NULL or malformed emails enforces the business rule by preventing invalid customer records from entering the trusted dataset while preserving them for correction. This approach handles both missing and invalid values and supports data quality remediation rather than silent data loss, which aligns with the requirement that every customer record must have a valid email.

Why this answer

The business rule requires every customer record to have a valid email address. Quarantining records with NULL or malformed emails prevents invalid data from entering the trusted dataset while keeping those records for remediation. This enforces the rule without discarding data or fabricating values, and it handles both missing and invalid formats.

Exam trap

The trap here is treating a data quality rule as a simple NOT NULL constraint, which would reject rows instead of remediating them and would not catch malformed but non-NULL email addresses.

23
MCQeasy

Which SQL command is used to add new records to an existing table?

A.UPDATE
B.SELECT
C.ALTER
D.INSERT
AnswerD

INSERT appends new rows to an existing table, specifying target columns and values. UPDATE modifies existing rows, DELETE removes them, and CREATE TABLE defines structure, so INSERT is the only command that adds records as the question requires.

Why this answer

INSERT INTO is the standard command for adding new rows to a database table.

24
MCQeasy

A data analyst needs to retrieve the average order value for each region from a sales table. The table has columns region, order_id, and order_total. Which SQL statement correctly returns one row per region with its average order value?

A.SELECT region, AVG(order_total) FROM sales GROUP BY region;
B.SELECT region, SUM(order_total)/COUNT(*) FROM sales;
C.SELECT region, AVG(order_total) FROM sales;
D.SELECT DISTINCT region, AVG(order_total) FROM sales;
AnswerA

GROUP BY region collapses rows into one per region, and AVG(order_total) computes the average order value for each group. This returns exactly one row per region with the average, which is the required output. It is the standard and most efficient way to produce per-group aggregates in SQL.

Why this answer

Per-region averages require grouping rows by region and applying AVG to order_total within each group. The GROUP BY clause creates one result row per distinct region, and AVG computes the mean for that region. Omitting GROUP BY yields a single overall aggregate, and using DISTINCT does not substitute for grouping because it operates on the final result set rather than partitioning rows for aggregation.

Exam trap

The trap here is thinking DISTINCT can replace GROUP BY for per-category aggregates, when DISTINCT only removes duplicate rows from the result set.

25
MCQmedium

When cleaning a dataset, you notice that column names contain inconsistent casing (e.g., 'Name', 'NAME', 'name'). Which transformation step should be prioritized to facilitate join operations?

A.String Normalization
B.One-hot encoding
C.Data Binning
D.Data deduplication
AnswerA

Normalizing casing ensures consistency for joins.

Why this answer

Inconsistent casing in column names (e.g., 'Name', 'NAME', 'name') is a string-formatting issue that must be resolved before joins, because most databases treat identifiers as case-sensitive (or case-insensitive depending on collation) and mismatched casing causes join failures or duplicate columns. String Normalization standardises casing, whitespace, and formatting across the dataset.

Exam trap

DS0-001 often tests the confusion between string normalization (formatting consistency) and deduplication (removing duplicate records) — candidates see 'inconsistent' and jump to deduplication without reading that the issue is casing in column names.

How to eliminate wrong answers

Option B is wrong because one-hot encoding converts categorical variables into binary indicator columns — it addresses categorical encoding for machine learning, not column-name consistency for joins. Option C is wrong because data binning groups continuous values into discrete buckets (e.g., age ranges), which is unrelated to fixing casing in identifiers. Option D is wrong because data deduplication removes duplicate rows, not inconsistent column-name formatting; deduplication would not resolve a join failure caused by 'Name' vs 'name'.

26
MCQmedium

A data analyst is querying a sales table with columns order_id, order_date, customer_id, and order_total. They need to return each order along with the running total of order_total for each customer, ordered by order_date. Which SQL feature should they use?

A.A GROUP BY customer_id with SUM(order_total) and ORDER BY order_date
B.A self-join on customer_id with a condition that the joined order_date is less than or equal to the outer order_date, then SUM the joined order_total
C.A correlated subquery that selects SUM(order_total) from the same table where customer_id matches and order_date is less than the outer order_date
D.A window function with PARTITION BY customer_id ORDER BY order_date and a SUM() aggregate
AnswerD

A window function with PARTITION BY customer_id ORDER BY order_date and SUM() computes a running total per customer without collapsing rows. The PARTITION BY restarts the sum for each customer, and the ORDER BY defines the accumulation sequence. This returns every order row plus the cumulative total, exactly matching the requirement for a per-customer running total ordered by date.

Why this answer

The running total per customer requires preserving each order row while accumulating order_total in date order within each customer. A window function with PARTITION BY customer_id and ORDER BY order_date, using SUM() as the window aggregate, achieves this in one pass and returns the detail rows plus the cumulative value. Grouping, self-joins, or correlated subqueries either collapse rows or perform poorly and ambiguously.

Exam trap

The trap here is assuming that GROUP BY with SUM can produce a running total, when grouping actually collapses rows and cannot return per-order detail.

27
MCQmedium

A data analyst is writing a query to find the average order value (AOV) per customer from an orders table that includes cancelled and returned orders. They want to exclude those orders from the calculation but still show all customers, including those with no valid orders. Which SQL construct should they use to ensure customers with no valid orders appear with a NULL or zero AOV?

A.LEFT JOIN between customers and orders with a WHERE clause filtering out cancelled and returned orders
B.FULL OUTER JOIN between customers and orders
C.LEFT JOIN between customers and orders with the order status filter in the ON clause
D.INNER JOIN between customers and orders
AnswerC

Placing the order status filter in the ON clause of a LEFT JOIN preserves all customers from the left table. Customers with no valid orders will have NULL values from the orders table, allowing aggregation to produce NULL or zero AOV. This correctly satisfies the requirement to show all customers while excluding cancelled and returned orders from the calculation.

Why this answer

To include all customers while excluding certain orders from the aggregation, the filter must be applied in the ON clause of a LEFT JOIN. This keeps all left-table rows and only joins matching right-table rows that satisfy the condition. Customers without valid orders retain NULLs, which can be handled in the SELECT list to display zero or NULL AOV.

Exam trap

The trap here is assuming that a LEFT JOIN with a WHERE filter on the right table still preserves all left-table rows, when in fact it silently converts the join to an inner join for those rows.

28
MCQmedium

A data analyst needs to calculate the total sales for each product category, but only for categories where the total sales exceed $10,000. The sales table contains columns sale_id, product_id, category, and amount. Which SQL query correctly produces the desired result?

A.SELECT category, SUM(amount) AS total_sales FROM sales GROUP BY category HAVING SUM(amount) > 10000;
B.SELECT category, SUM(amount) AS total_sales FROM sales GROUP BY category WHERE total_sales > 10000;
C.SELECT category, SUM(amount) AS total_sales FROM sales HAVING SUM(amount) > 10000 GROUP BY category;
D.SELECT category, SUM(amount) AS total_sales FROM sales WHERE SUM(amount) > 10000 GROUP BY category;
AnswerA

This query correctly groups rows by category, computes the sum of amount for each group, and then filters the grouped results using HAVING to include only categories where the total exceeds $10,000. The HAVING clause is specifically designed to filter aggregated results, making it the right choice for this scenario.

Why this answer

To filter aggregated results, the HAVING clause must be used after GROUP BY. The correct query groups sales by category, sums the amount, and then applies the condition to include only those groups with total sales over $10,000. Using WHERE with an aggregate or misplacing HAVING results in errors.

Exam trap

The trap here is confusing the WHERE and HAVING clauses, thinking that WHERE can filter aggregated data.

29
MCQhard

When using Python's 'Matplotlib' library, which function is used to add a new figure to the canvas?

A.plt.axis()
B.plt.plot()
C.plt.figure()
D.plt.show()
AnswerC

`plt.figure()` creates a new Figure object and registers it with pyplot's state machine, returning it for subsequent plotting calls. This directly satisfies the stem's requirement to add a new figure to the canvas, unlike axis-level or subplot functions that operate within an existing figure.

Why this answer

In Matplotlib, the plt.figure() function is used to create a new figure object, which serves as the canvas for plotting. Calling plt.figure() adds a new figure to the current pyplot state and returns a Figure instance that can be populated with axes and plots. Without calling plt.figure(), plotting functions like plt.plot() will draw on the current figure, or create one implicitly if none exists.

Exam trap

DS0-001 often tests the distinction between figure-level and axes-level functions, catching candidates who confuse plt.plot() (which draws data) with plt.figure() (which creates the canvas).

How to eliminate wrong answers

Option A is wrong because plt.axis() is used to get or set axis properties such as limits, ticks, and labels — it does not create a new figure. Option B is wrong because plt.plot() draws line plots on the current axes; it does not create a new figure canvas, though it may implicitly create one if none exists. Option D is wrong because plt.show() displays all open figures in an interactive window; it does not create a new figure.

30
MCQmedium

A data analyst is using a subquery in the WHERE clause to filter customers who have placed at least one order. The subquery returns customer_id values from the orders table. Which SQL construct correctly expresses this requirement?

A.SELECT * FROM customers WHERE customer_id IN (SELECT customer_id FROM orders);
B.SELECT * FROM customers WHERE customer_id ANY (SELECT customer_id FROM orders);
C.SELECT * FROM customers WHERE customer_id = (SELECT customer_id FROM orders);
D.SELECT * FROM customers WHERE EXISTS (SELECT customer_id FROM orders);
AnswerA

The IN operator with a subquery tests whether each customer_id appears in the set of customer_id values returned by the orders subquery. This correctly filters customers who have at least one order, regardless of duplicates in the subquery. It is the standard and readable way to express a semi-join in SQL.

Why this answer

Filtering customers who have at least one order is a semi-join pattern. The IN operator with a subquery compares each outer customer_id against the set of customer_id values from orders, returning customers with at least one match. A scalar equality fails with multiple rows, an uncorrelated EXISTS returns all customers when orders is non-empty, and ANY without a comparison operator is invalid syntax.

Exam trap

The trap here is using EXISTS without correlating the subquery to the outer table, which makes the condition true for every row instead of filtering by customer.

31
MCQmedium

In the context of data quality, what does 'Completeness' refer to?

A.The consistency of data across sources
B.The absence of missing values
C.The timeliness of the data
D.The accuracy of values
AnswerB

Completeness measures whether all required values are actually populated, so it refers to the absence of missing values in a dataset. Records with null or absent entries reduce completeness, distinguishing it from accuracy, which concerns correctness of present values.

Why this answer

In data quality, Completeness refers to the degree to which all required data values are present — i.e., the absence of missing values in a dataset. It measures whether records have all expected attributes populated, not whether those values are correct or consistent.

Exam trap

DS0-001 often tests the confusion between Completeness (absence of missing values) and Accuracy (correctness of values), since both are core data quality dimensions but address different aspects of data fitness.

How to eliminate wrong answers

Option A is wrong because consistency across sources is a different dimension (Consistency), not Completeness. Option C is wrong because timeliness refers to data being available when needed (Timeliness), not whether values are missing. Option D is wrong because accuracy concerns whether values correctly reflect reality (Accuracy), which is distinct from whether they are present at all.

32
MCQhard

A data analyst is examining a query that uses a LEFT JOIN between a customers table and an orders table. The analyst notices that some customers appear multiple times in the result set. Which of the following is the most likely cause?

A.The join is using a non-unique column in the customers table.
B.The join condition is missing a filter on the orders table.
C.The orders table has multiple orders for the same customer.
D.The customers table has duplicate customer IDs.
AnswerC

In a LEFT JOIN, each row from the left table (customers) is combined with matching rows from the right table (orders). If a customer has multiple orders, that customer will appear multiple times in the result set, once for each order. This is expected behavior and the most common reason for duplicate customer rows in a LEFT JOIN result.

Why this answer

In a LEFT JOIN, each left-table row is paired with all matching right-table rows. Since a customer can have multiple orders, the customer will appear multiple times, once per order. This is the expected result of a one-to-many relationship and the most common reason for duplicate customer rows in such a join.

Exam trap

The trap here is assuming that duplicates indicate a data quality issue, when they are actually a natural result of a one-to-many join.

33
MCQeasy

A data analyst is writing a SQL query to retrieve unique department names from the 'Employees' table. Which keyword should be utilized to ensure the results do not contain duplicate entries?

A.GROUP BY
B.DISTINCT
C.UNIQUE
D.FILTER
AnswerB

DISTINCT eliminates duplicate rows from the result set by comparing all selected column values, returning each unique department name once. It directly satisfies the requirement that results contain no duplicate entries, unlike keywords that filter rows conditionally or aggregate values rather than deduplicating the projected output.

Why this answer

The DISTINCT keyword is the correct choice because it eliminates duplicate rows from the result set, returning only unique values for the selected columns. When applied as SELECT DISTINCT department FROM Employees, the database engine sorts or hashes the intermediate result to remove duplicates before returning rows. This is the ANSI SQL standard mechanism specifically designed for deduplication of query output.

Exam trap

DS0-001 often tests the confusion between DISTINCT (a query keyword for deduplication) and UNIQUE (a DDL constraint), so candidates who conflate schema-level uniqueness with result-set deduplication pick the wrong answer.

How to eliminate wrong answers

Option A is wrong because GROUP BY is used for aggregation — it groups rows so aggregate functions (COUNT, SUM, AVG) can be applied per group, and while it does produce unique group values, it is semantically an aggregation clause, not a deduplication clause, and requires either aggregates or all non-aggregated columns in the GROUP BY list. Option C is wrong because UNIQUE is a constraint keyword used in DDL (CREATE TABLE, ALTER TABLE) to enforce uniqueness at the schema level, not a query keyword for filtering result sets. Option D is wrong because FILTER is a clause used with aggregate functions (e.g., COUNT(*) FILTER (WHERE ...)) in PostgreSQL and SQL:2003, not a deduplication mechanism.

34
MCQmedium

An analyst joins a large fact table to a small lookup table using an inner join and notices that the result contains more rows than the original fact table. After reviewing the data, the analyst discovers that the lookup table contains duplicate values in its join key. Which action should the analyst take to ensure each fact row is matched to at most one lookup row?

A.Deduplicate the lookup table by selecting one row per join key before performing the join.
B.Move the join condition from the ON clause into the WHERE clause.
C.Change the join to a LEFT OUTER JOIN so unmatched fact rows are preserved.
D.Add a DISTINCT clause to the SELECT statement to remove duplicate result rows.
AnswerA

Deduplicating the lookup table so that each join key appears once ensures the inner join returns at most one lookup row per fact row, eliminating the row multiplication. This can be done with a subquery that groups by the key or uses a window function such as ROW_NUMBER to pick a representative row. It directly addresses the duplicate-key cause of the inflated row count.

Why this answer

Row multiplication in a join occurs when the join key is not unique on one side. Making the lookup table unique per join key guarantees a one-to-one or many-to-one relationship, so each fact row matches at most one lookup row. Deduplicating the lookup before joining is the targeted fix; changing join type, adding DISTINCT, or relocating predicates does not address the duplicate-key root cause.

Exam trap

The trap here is assuming DISTINCT or a LEFT JOIN will fix duplicate matches, when the real cause is a non-unique join key in the lookup table.

35
MCQhard

When troubleshooting a performance bottleneck in a visualization, which action is most effective if the data source is a large SQL view?

A.Changing the chart color
B.Materializing the view
C.Increasing the number of filters
D.Using a different visualization software
AnswerB

Materialising the view precomputes and stores the result set, so the visualisation queries a physical table instead of re-executing the underlying joins and aggregations on every refresh. This directly removes the repeated full-view scan that causes the bottleneck, satisfying the large SQL view constraint.

Why this answer

Materializing the view (creating a physical table with indexes) or optimizing the view's underlying query is the most effective way to resolve performance issues.

36
MCQhard

A data analyst is using a window function to rank products by sales within each region. They write: RANK() OVER (PARTITION BY region ORDER BY sales DESC). They notice that products with identical sales receive the same rank, but the next rank is skipped (e.g., 1,2,2,4). They want to assign consecutive ranks without gaps. Which function should they use instead?

A.ROW_NUMBER()
B.PERCENT_RANK()
C.NTILE(4)
D.DENSE_RANK()
AnswerD

DENSE_RANK() assigns ranks without gaps, so ties receive the same rank and the next rank is the next consecutive integer (e.g., 1,2,2,3). This matches the requirement to assign consecutive ranks without gaps. It is specifically designed for this purpose and is the correct choice.

Why this answer

DENSE_RANK() assigns the same rank to tied values and does not skip ranks afterward, producing consecutive integers. RANK() skips ranks after ties, ROW_NUMBER() ignores ties, and NTILE and PERCENT_RANK serve different purposes. DENSE_RANK is the correct function for consecutive ranks without gaps.

Exam trap

The trap here is confusing RANK() with DENSE_RANK(): RANK() leaves gaps after ties, while DENSE_RANK() does not.

37
MCQhard

An analyst notices that a database query is performing full table scans even though a WHERE clause is present on a indexed column. What is a likely reason for this?

A.Too many rows match the criteria
B.The table is too small
C.The index is fragmented
D.Using a function on the indexed column
AnswerD

Wrapping the indexed column in a function, such as UPPER(column), prevents the optimiser from using the index because the stored values no longer match the computed expression. The database therefore falls back to a full table scan despite the WHERE clause referencing that column.

Why this answer

When a function is applied to an indexed column in a WHERE clause (e.g., WHERE UPPER(name) = 'SMITH'), the optimizer cannot use the index because the index stores the raw column values, not the function results. This forces a full table scan. The fix is to rewrite the predicate to avoid wrapping the column in a function or to create a function-based/computed-column index.

Exam trap

DS0-001 often tests whether candidates recognize non-sargable predicates, so the trap is assuming fragmentation or statistics are the cause when the real issue is a function wrapped around the indexed column.

How to eliminate wrong answers

Option A is wrong because even if many rows match, the optimizer can still use an index scan or index range scan — a high match count alone does not force a full table scan. Option B is wrong because small tables may legitimately use scans, but the question states the query is performing full scans despite an index, implying a larger table where the index should be used. Option C is wrong because index fragmentation degrades performance but does not prevent the optimizer from choosing the index — it would still perform an index scan, not a full table scan.

38
MCQhard

A data analyst is building a monthly customer churn report. The churn definition is: a customer is churned in month M if they had at least one transaction in month M-3 but zero transactions in months M-2, M-1, and M. Which SQL approach correctly identifies churned customers for each month without missing customers who simply had no activity at all?

A.Build a calendar spine of months, LEFT JOIN customers and their transactions to it, then use conditional aggregation to detect the required activity pattern.
B.Use the LAG window function on transaction dates and filter where the lag is greater than 90 days.
C.Use an INNER JOIN between the transactions table and itself on customer_id and month offsets, filtering for rows where the offset months are NULL.
D.Use a correlated subquery with NOT EXISTS to find customers whose most recent transaction is older than three months.
AnswerA

A calendar spine guarantees every month appears for every customer, and LEFT JOIN preserves customers with no transactions. Conditional aggregation can then count transactions in M-3 and confirm zero in M-2, M-1, and M, correctly identifying churn even when no rows exist. This approach explicitly handles absent activity, which the definition requires.

Why this answer

Churn here is defined by presence in one month and absence in the following three, which requires representing months with no activity. A calendar spine joined to customers ensures every month is present, and LEFT JOIN to transactions keeps zero-activity months visible. Conditional aggregation then tests the exact pattern, avoiding the false negatives that inner joins and existence checks would create.

Exam trap

The trap here is using NOT EXISTS or LAG to detect inactivity, which conflates general gaps with the specific calendar pattern of one qualifying transaction followed by three silent months.

39
MCQmedium

When normalizing a database, what is the primary goal of moving data into a third normal form (3NF)?

A.Remove transitive dependencies
B.Enable multi-dimensional analysis
C.Increase data redundancy
D.Increase read speed
E.Combine multiple tables
AnswerA

Third normal form eliminates transitive dependencies, where a non-key attribute depends on another non-key attribute rather than the primary key. Achieving 3NF therefore requires every non-key column to depend solely on the key, satisfying the stem's stated goal of removing those indirect relationships.

Why this answer

Third normal form (3NF) builds on 2NF by eliminating transitive dependencies — non-key attributes that depend on other non-key attributes rather than directly on the primary key. The rule is that every non-key column must depend on 'the key, the whole key, and nothing but the key.' Removing transitive dependencies prevents update anomalies where changing one fact forces changes in unrelated rows, ensuring each fact is stored in exactly one place.

Exam trap

DS0-001 often tests the distinction between normalization goals (removing transitive dependencies in 3NF) and denormalization benefits (read speed, redundancy), so candidates who confuse the two pick D or C.

How to eliminate wrong answers

Option B is wrong because multi-dimensional analysis is the goal of dimensional modeling (star/snowflake schemas), not 3NF — 3NF is actually normalized away from dimensional structures. Option C is wrong because normalization specifically reduces redundancy, not increases it; increasing redundancy is a denormalization tactic. Option D is wrong because 3NF typically reduces read speed due to additional joins; denormalization is used to improve read performance.

Option E is wrong because normalization splits tables apart to remove redundancy, whereas combining tables is a denormalization step that reintroduces it.

40
MCQmedium

A data engineer is profiling a customer table and notices that the Email column contains several NULL values, duplicate addresses, and inconsistent formatting such as mixed uppercase and lowercase characters. The engineer wants to quantify how many rows have a NULL Email before deciding on a cleansing strategy. Which SQL expression should be used to return that count?

A.SELECT COUNT(*) FROM Customer WHERE Email = NULL;
B.SELECT COUNT(*) FROM Customer WHERE Email IS NULL;
C.SELECT COUNT(Email) FROM Customer WHERE Email IS NULL;
D.SELECT COUNT(Email) FROM Customer;
AnswerB

This query counts all rows where the Email column has no value, which is exactly the metric the engineer needs before choosing a cleansing approach. The IS NULL predicate is the only standard way to test for missing values reliably, and COUNT(*) includes rows regardless of other column values, giving an accurate total of missing emails.

Why this answer

Missing values are detected with the IS NULL predicate, and the number of such rows is obtained with COUNT(*), which counts rows regardless of column contents. COUNT(Email) would exclude NULLs and return zero when combined with the IS NULL filter. Therefore, counting all rows where Email IS NULL gives the accurate count of missing email addresses needed for data profiling.

Exam trap

The trap here is using COUNT(Email) with an IS NULL filter, which returns zero because COUNT of a column skips NULL values.

41
MCQhard

You are debugging a SQL query that uses an aggregate function. You receive an error stating that a column in your SELECT list is not part of an aggregate or a GROUP BY clause. What is the cause?

A.Missing WHERE clause
B.Incorrect join type
C.Missing column in GROUP BY
D.Using an alias in WHERE
AnswerC

Aggregate queries collapse rows, so every non-aggregated SELECT column must appear in GROUP BY to define grouping keys. The named column is absent from that clause, leaving the engine unable to determine which value to return per group.

Why this answer

SQL requires that every column in the SELECT list be either aggregated (e.g., SUM, COUNT, AVG) or included in the GROUP BY clause when aggregation is used. The error 'column is not part of an aggregate or GROUP BY' means a non-aggregated column was selected without being listed in GROUP BY, so the engine cannot determine which value to return per group.

Exam trap

DS0-001 often tests whether candidates can distinguish the aggregate/GROUP BY error from other common SQL errors like alias misuse in WHERE or join mistakes, which are plausible but technically incorrect distractors.

How to eliminate wrong answers

Option A is wrong because a missing WHERE clause would simply return more rows — it does not cause an aggregate/GROUP BY validation error. Option B is wrong because an incorrect join type affects which rows are combined, not whether SELECT columns satisfy aggregate rules. Option D is wrong because using an alias in WHERE causes an 'invalid column name' or 'unknown column' error, not the aggregate/GROUP BY error described.

42
Multi-Selecthard

Which THREE of the following are components of a standard SQL SELECT statement?

Select 3 answers
A.DROP
B.GRANT
C.WHERE
D.FROM
E.GROUP BY
AnswersC, D, E

WHERE filters rows before grouping, satisfying the stem's requirement for a standard SELECT component. It evaluates each row against a predicate, restricting which records proceed to later clauses such as GROUP BY or ORDER BY. This row-level filtering distinguishes it from HAVING, which filters aggregated groups after GROUP BY has been applied.

Why this answer

The WHERE clause (C) is a core component of a standard SQL SELECT statement because it filters the rows returned by the query according to a specified predicate. The FROM clause (D) is also essential, as it specifies the table or tables from which the data is retrieved. The GROUP BY clause (E) is a standard SELECT component that aggregates rows sharing common values into groups, typically used with aggregate functions such as COUNT, SUM, or AVG.

By contrast, DROP (A) is a DDL statement used to delete database objects like tables or views, and GRANT (B) is a DCL statement used to assign privileges to users, so neither belongs inside a SELECT statement.

Exam trap

DS0-001 often tests whether candidates can distinguish between SQL statement types (DDL, DML, DCL) and SELECT clauses, so the trap is picking DROP or GRANT because they are familiar SQL keywords.

43
MCQeasy

What is the benefit of using a 'Dashboard' over a static report?

A.Simplified data security
B.Lower storage requirements
C.Dynamic exploration and interactivity
D.Easier to print
AnswerC

A dashboard supports interactive filtering, drill-down and live data refresh, letting users explore dimensions and uncover patterns on demand. A static report presents fixed, pre-rendered output, so it cannot answer follow-up questions without regeneration, making dynamic exploration the dashboard's core benefit.

Why this answer

A dashboard's defining advantage over a static report is interactivity: users can filter, drill down, change time ranges, and pivot dimensions in real time without requesting a new report. This dynamic exploration lets stakeholders answer follow-up questions on the spot, whereas a static report presents a fixed snapshot that must be regenerated for any variation.

Exam trap

DS0-001 often tests dashboard benefits by offering plausible-sounding operational advantages (security, storage, printing) — candidates must anchor on interactivity/dynamic exploration as the core differentiator, not peripheral attributes.

How to eliminate wrong answers

Option A is wrong because dashboards do not simplify data security — in fact, they often complicate it by exposing live data to more viewers and requiring row-level security, viewer authentication, and audit logging. Option B is wrong because dashboards typically consume more storage and compute (cached extracts, in-memory engines) than a static PDF or spreadsheet report. Option D is wrong because dashboards are notoriously hard to print — their value is in on-screen interactivity, and printing flattens them into a static image, defeating the purpose.

44
MCQeasy

In data visualization, what is the 'Data-Ink Ratio' intended to improve?

A.Chart rendering speed
B.Color palette selection
C.Data compression
D.Chart readability and clarity
AnswerD

The Data-Ink Ratio, proposed by Edward Tufte, measures the proportion of ink devoted to actual data versus decorative elements. Maximising it removes chartjunk such as redundant gridlines and 3D effects, directly improving readability and clarity so viewers interpret the data faster and more accurately.

Why this answer

The Data-Ink Ratio, introduced by Edward Tufte, is the proportion of ink used to display actual data versus total ink used in the graphic. A higher ratio means more of the visual elements convey data, reducing non-data ink like gridlines, borders, and decorative elements. This directly improves chart readability and clarity by minimizing distractions and focusing the viewer on the data.

Thus, option D is correct.

Exam trap

DS0-001 often tests the misconception that Data-Ink Ratio is about performance or aesthetics, when it is actually about the proportion of ink dedicated to data to enhance clarity.

How to eliminate wrong answers

Option A is wrong because chart rendering speed depends on factors like file size, complexity of graphical elements, and rendering engine, not on the Data-Ink Ratio; in fact, reducing ink might slightly speed rendering but that is not the intent. Option B is wrong because color palette selection is about aesthetics and perceptual effectiveness, not about the proportion of ink dedicated to data. Option C is wrong because data compression refers to reducing file size through algorithms like gzip or JPEG compression, which is unrelated to the concept of data-ink ratio.

45
MCQhard

When analyzing JSON data stored in a relational database using SQL, how do you typically access nested key-value pairs?

A.Using path-based operators
B.Converting to XML first
C.Using the SELECT * command
D.Using standard JOINs
AnswerA

JSON stored in relational columns is queried with path-based operators such as JSON_VALUE or the -> and ->> operators, which traverse the document hierarchy to reach nested keys. These operators return the value at a specified path, unlike plain column selection.

Why this answer

Path-based operators are the correct approach because JSON stored in relational databases (e.g., PostgreSQL's jsonb, MySQL's JSON, SQL Server's JSON functions) is accessed using path expressions that navigate nested keys and array indices. Examples include PostgreSQL's -> and ->> operators, MySQL's JSON_EXTRACT() and -> syntax, and SQL Server's JSON_VALUE() with '$.key.subkey' paths. These operators let you drill into nested structures without transforming the data.

Exam trap

DS0-001 often tests whether candidates understand that JSON in relational databases is queried with path operators rather than by flattening, joining, or converting formats — the trap is assuming standard SQL constructs like JOIN or SELECT * can navigate nested structures.

How to eliminate wrong answers

Option B is wrong because converting JSON to XML first is an unnecessary and lossy transformation — modern relational databases have native JSON functions and operators that work directly on the stored JSON, and XML conversion adds complexity without benefit. Option C is wrong because SELECT * retrieves all columns of the table but does not navigate into nested JSON structures; it returns the entire JSON document as a single column value. Option D is wrong because standard JOINs combine rows across tables based on matching keys — they do not parse or traverse nested key-value pairs within a JSON document.

46
MCQmedium

When joining two tables in SQL where you need to return all records from the left table even if there is no match in the right table, which JOIN type is appropriate?

A.LEFT JOIN
B.CROSS JOIN
C.INNER JOIN
D.FULL OUTER JOIN
AnswerA

LEFT JOIN returns every row from the left table and matching rows from the right, filling unmatched right-side columns with NULL. It satisfies the stem's requirement to retain all left-table records despite missing matches, unlike INNER JOIN, which discards them.

Why this answer

A LEFT JOIN (or LEFT OUTER JOIN) returns all rows from the left table and the matched rows from the right table. If there is no match, the result is NULL on the right side. This exactly matches the requirement to return all records from the left table even if there is no match in the right table.

Therefore, LEFT JOIN is correct.

Exam trap

DS0-001 often tests join types, and candidates may confuse LEFT JOIN with FULL OUTER JOIN, but the key is that LEFT JOIN returns all rows from the left table only, while FULL OUTER JOIN returns all rows from both tables.

How to eliminate wrong answers

Option B is wrong because a CROSS JOIN returns the Cartesian product of both tables, which is not what is needed. Option C is wrong because an INNER JOIN returns only the rows that have matching values in both tables, thus excluding left table rows without a match. Option D is wrong because a FULL OUTER JOIN returns all rows from both tables, including unmatched rows from both sides, which is more than required.

47
Multi-Selecteasy

Which TWO of the following are common types of data visualizations used to represent trends over time?

Select 2 answers
A.Histogram
B.Scatter Plot
C.Line Chart
D.Area Chart
E.Pie Chart
AnswersC, D

Line charts plot data points connected by straight segments along a continuous time axis, making them the standard visualisation for showing trends and rate of change over time. This directly satisfies the stem's requirement to represent trends over time.

Why this answer

A Line Chart (C) is correct because it plots data points connected by lines along a continuous time axis, making it the standard visualization for showing trends, patterns, and changes over time. An Area Chart (D) is also correct because it is essentially a line chart with the area beneath the line filled in, and it likewise uses a continuous time-based axis to represent trends over time (often emphasizing magnitude or cumulative volume). A Histogram (A) is not correct here because it displays the frequency distribution of continuous data across bins rather than a time series.

A Scatter Plot (B) is not correct because it shows the relationship or correlation between two variables as individual points, not a trend over time. A Pie Chart (E) is not correct because it represents parts of a whole as proportional slices at a single point in time, not changes over time.

Exam trap

DS0-001 often tests the distinction between charts for trends over time (line, area) and charts for distribution (histogram) or correlation (scatter plot), catching candidates who pick any familiar chart type without considering the time dimension.

48
Multi-Selecthard

Which TWO of the following are common issues encountered when integrating data from disparate sources?

Select 2 answers
A.Excessive storage space
B.Inconsistent data formats
C.Fast network speeds
D.Conflicting identifiers
E.Over-documentation
AnswersB, D

Sources frequently represent the same field differently — dates as DD/MM/YYYY versus MM-DD-YYYY, or varying numeric precision — which breaks parsing and comparison during merging. Standardising inconsistent data formats is thus a common integration issue, directly satisfying the stem's scenario of combining disparate sources.

Why this answer

Option B (Inconsistent data formats) is correct because disparate sources often store the same attribute using different representations—such as dates as MM/DD/YYYY versus ISO 8601, currencies with different symbols or decimal separators, or text encodings like UTF-8 versus Latin-1—which must be normalized before the data can be joined or compared. Option D (Conflicting identifiers) is correct because the same real-world entity may be keyed differently across systems (e.g., a customer as SSN in one source, a UUID in another, or a legacy account number in a third), creating duplicate or mismatched records that require entity resolution or key mapping. The unmarked options do not belong: excessive storage space (A) is a capacity/cost concern rather than an integration problem, fast network speeds (C) are beneficial and not an issue, and over-documentation (E) is a documentation practice, not a data-integration obstacle.

Exam trap

DS0-001 often tests whether candidates can identify genuine integration pain points (format inconsistency, conflicting identifiers) versus non-issues or benefits (fast networks, excessive storage) inserted as distractors.

49
Multi-Selecthard

A data analyst is reviewing a query that joins three tables: orders, customers, and products. The query returns more rows than expected. Which TWO of the following are likely causes of the row multiplication? (Choose two.)

Select 2 answers
A.The query filters on a column that contains NULL values in the products table
B.The query includes a many-to-many relationship between orders and products without an intermediate bridge table
C.The join condition between orders and customers uses a non-unique key in the customers table
D.The query orders the result by a column with duplicate values
E.The query uses an INNER JOIN instead of a LEFT JOIN between orders and customers
AnswersB, C

A direct many-to-many join between orders and products multiplies rows because each order matches many products and each product matches many orders. Without a bridge table like order_items that resolves the relationship, the result set expands combinatorially. Introducing the proper junction table with quantity and price attributes restores the intended grain.

Why this answer

Row multiplication in multi-table joins typically stems from join cardinality mismatches. A non-unique key on the dimension side causes one fact row to match multiple dimension rows, and a many-to-many relationship without a bridge table causes combinatorial expansion. Join type changes, NULL filters, and sorting affect inclusion or order but not the number of matched rows, so they do not explain the inflated result set.

Exam trap

The trap here is blaming join type or sorting for extra rows, when row multiplication is caused by cardinality mismatches in the join keys or missing bridge tables.

50
MCQeasy

Which of the following is an example of an unstructured data source that a data analyst might need to ingest?

A.An email message body
B.An XML file with defined tags
C.A relational SQL table
D.A CSV file with fixed columns
AnswerA

An email message body is free-form text with no predefined schema or tabular structure, making it unstructured. Relational tables, CSV columns and fixed-format records are structured; the analyst must parse or apply natural-language techniques to ingest this content.

Why this answer

An email message body is unstructured because it has no predefined schema — the text, formatting, and embedded content vary freely and must be parsed with NLP or regex rather than mapped to columns. This is the classic example of unstructured data that analysts ingest for sentiment analysis, eDiscovery, or customer-support mining.

Exam trap

DS0-001 often tests structured vs. unstructured by offering XML or CSV as distractors — candidates who equate 'not a SQL table' with 'unstructured' miss that XML and CSV are semi-structured/structured because they carry explicit schema or fixed columns.

How to eliminate wrong answers

Option B is wrong because XML has defined tags and a schema (DTD or XSD), making it semi-structured — its hierarchy is explicit and machine-parseable. Option C is wrong because a relational SQL table is the archetype of structured data, with typed columns and enforced constraints. Option D is wrong because a CSV with fixed columns is also structured (or at best semi-structured) — each row conforms to the same column layout, so it loads directly into a table.

51
MCQhard

A database administrator needs to ensure that a query calculating running totals is performant. Which window function clause is essential to order the calculation sequence?

A.GROUP BY
B.PARTITION BY
C.ROWS BETWEEN
D.ORDER BY
AnswerD

The ORDER BY clause inside the OVER() specification defines the row sequence the window function processes, which is essential for cumulative running totals. Without it, the frame is unordered and the sum accumulates arbitrarily, producing incorrect totals regardless of partitioning.

Why this answer

The ORDER BY clause inside the OVER() specification defines the logical ordering of rows for the window function, which is essential for running totals because the cumulative sum must be computed in a defined sequence. Without ORDER BY, the window frame defaults to the entire partition and the running total is meaningless. ORDER BY establishes the row sequence that makes the cumulative calculation deterministic.

Exam trap

DS0-001 often tests the confusion between PARTITION BY (grouping) and ORDER BY (sequencing) in window functions — candidates must recognize that running totals require ORDER BY to define the calculation sequence.

How to eliminate wrong answers

Option A is wrong because GROUP BY collapses rows into aggregate groups and is incompatible with window functions in the same SELECT for producing per-row running totals. Option B is wrong because PARTITION BY divides rows into independent groups (e.g., per customer) but does not order rows within each partition, so it cannot define the calculation sequence. Option C is wrong because ROWS BETWEEN defines the frame boundaries (e.g., UNBOUNDED PRECEDING TO CURRENT ROW) but relies on ORDER BY to establish what 'preceding' and 'current' mean — without ORDER BY the frame is non-deterministic.

52
Multi-Selectmedium

A data analyst is preparing a query to compare average order values across customer segments. Before running the analysis, the analyst reviews the dataset and finds that the OrderAmount column has missing values and extreme outliers. Which TWO actions should the analyst take to improve the reliability of the comparison? (Choose two.)

Select 2 answers
A.Convert OrderAmount to a VARCHAR data type so that non-numeric entries can be stored alongside numbers.
B.Handle missing OrderAmount values explicitly, for example by excluding them or imputing them with a documented method.
C.Investigate and treat extreme outliers, such as by winsorizing or reporting medians alongside means.
D.Remove the customer segment column and analyze the entire population as a single group.
E.Increase the number of decimal places displayed in the report to make the averages appear more precise.
AnswersB, C

Missing values in the measure column can bias averages because aggregate functions like AVG ignore NULLs, effectively changing the denominator for each segment. Explicitly deciding to exclude or impute them, and documenting the choice, ensures the comparison reflects a known and consistent population. Leaving them unaddressed risks misleading differences between segments that are actually artifacts of missing data.

Why this answer

Reliable segment comparisons depend on consistent handling of missing values and on measures that are not dominated by extreme outliers. Explicitly deciding how to treat NULLs keeps the denominator consistent across segments, while investigating outliers and using robust statistics such as medians or winsorized means prevents a few transactions from skewing results. Changing data types, removing segmentation, or adjusting display precision does not improve the analysis.

Exam trap

The trap here is treating missing values and outliers as cosmetic issues, when both can materially distort averages and lead to false conclusions about segments.

53
MCQhard

A data analyst is querying a large partitioned table in Apache Hive that stores clickstream events. The table is partitioned by event_date and bucketed by user_id. The analyst needs to retrieve the latest event for each user within the last 30 days. The query currently uses a subquery with MAX(event_timestamp) and a join back to the table, but it runs slowly. Which optimization should the analyst apply to improve performance while preserving the correct result?

A.Add a DISTRIBUTE BY user_id and SORT BY event_timestamp DESC clause before the subquery.
B.Enable vectorization and set hive.optimize.bucketmapjoin to true, then rerun the original query.
C.Use a LEFT SEMI JOIN between the table and a subquery that selects user_id and MAX(event_timestamp).
D.Replace the subquery and join with a window function using ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY event_timestamp DESC) and filter on row number = 1.
AnswerD

Using ROW_NUMBER() partitioned by user_id and ordered by event_timestamp descending assigns rank 1 to the latest event per user. Filtering on row number = 1 returns exactly one latest event per user. This eliminates the extra join and subquery, often reducing shuffle and improving performance in Hive, especially when combined with partition pruning on event_date.

Why this answer

A window function with ROW_NUMBER() partitioned by user_id and ordered by event_timestamp descending directly identifies the latest event per user. Filtering on row number = 1 avoids the extra join and subquery, reducing data shuffling and improving performance. This approach also correctly handles ties by returning only one row per user, which the original subquery-join might not guarantee.

Exam trap

The trap here is assuming that a semi join or configuration tuning will deduplicate ties and eliminate the extra join, when a window function is specifically designed to rank rows within a partition.

54
MCQmedium

A data analyst runs a query against a PostgreSQL 15 data warehouse to calculate month-over-month revenue growth. The query uses the LAG window function partitioned by region and ordered by month. The analyst notices that the first month for each region returns a NULL growth value, which is causing downstream dashboard errors. Which action should the analyst take to handle this NULL value appropriately?

A.Wrap the LAG expression with COALESCE to substitute a default value such as 0 for the first month's growth.
B.Change the ORDER BY clause in the window function to sort by revenue instead of month.
C.Replace the LAG function with a self-join on the same table to retrieve the previous month's revenue.
D.Add a WHERE clause that filters out rows where the LAG result IS NULL before the dashboard consumes the data.
AnswerA

COALESCE returns the first non-NULL argument, so wrapping LAG(...) OVER (...) with COALESCE(..., 0) replaces the NULL growth for the first month per region with 0. This is the standard SQL approach to handle missing previous-period values, preventing downstream arithmetic or visualization errors while preserving the intended growth calculation for later months.

Why this answer

The LAG window function returns NULL when there is no preceding row within the partition, which occurs for the first month of each region. Wrapping the expression with COALESCE replaces that NULL with a defined default, such as 0, so downstream calculations and dashboards do not fail. This preserves all rows and maintains correct growth calculations for subsequent months.

Exam trap

The trap here is assuming that the NULL from LAG indicates a data quality problem to be filtered out, rather than a normal boundary condition that should be handled with a default value.

55
MCQeasy

What does the 'P' in the acronym 'KPI' stand for?

A.Product
B.Process
C.Performance
D.Planning
AnswerC

KPI expands to Key Performance Indicator, so the 'P' denotes Performance — the measurable value tracking how effectively an objective is met. It is not Productivity or Profit, which do not appear in the standard acronym.

Why this answer

KPI stands for Key Performance Indicator, where the 'P' represents Performance. A KPI is a quantifiable measure used to evaluate the success of an organization, project, or activity against strategic objectives. The 'Performance' element emphasizes that KPIs measure how well something is performing relative to a target.

Exam trap

DS0-001 often tests basic acronym recall, and candidates sometimes guess 'Process' or 'Product' because those words appear frequently in business contexts — the correct anchor is that KPIs measure performance against objectives.

How to eliminate wrong answers

Option A is wrong because 'Product' would make the acronym KPI stand for Key Product Indicator, which is not a recognized term and does not reflect the metric's evaluative purpose. Option B is wrong because 'Process' would yield Key Process Indicator, which describes a process metric but is not the standard expansion of KPI. Option D is wrong because 'Planning' would give Key Planning Indicator, which is not a defined business term and misrepresents the retrospective measurement nature of KPIs.

Ready to test yourself?

Try a timed practice session using only Data Querying And Analysis questions.