What this quiz covers
This quiz focuses on Transforming Tabular Data, giving you a quick way to practice the rules, question types, and explanations that matter most for Business Analytics.
An Orders dataset contains twelve rows. Five completed orders have a missing return_date; three canceled orders have a missing return_date; two completed orders have a populated return_date; and two orders have both a missing return_date and a missing status.
Under standard SQL null-handling rules, how many rows are returned by WHERE return_date IS NULL AND status <> 'Canceled'?
Business Analytics Quiz
Practice Transforming Tabular Data in Business Analytics with focused quiz questions that help you check what you know, review explanations, and build confidence with test-style prompts.
This quiz focuses on Transforming Tabular Data, giving you a quick way to practice the rules, question types, and explanations that matter most for Business Analytics.
Try each quiz question before looking at the correct answer. Use the explanations to review missed ideas, then come back to similar questions until the pattern feels familiar.
An Orders dataset contains twelve rows. Five completed orders have a missing return_date; three canceled orders have a missing return_date; two completed orders have a populated return_date; and two orders have both a missing return_date and a missing status.
Under standard SQL null-handling rules, how many rows are returned by WHERE return_date IS NULL AND status <> 'Canceled'?
WHERE clause combining IS NULL with a comparison like <> 'Canceled', the critical concept being tested is how SQL handles NULL values in boolean logic — specifically, that NULL is never equal to or not equal to anything; comparisons involving NULL always evaluate to UNKNOWN, not TRUE or FALSE.
Let's map out the twelve rows: 5 completed / missing return_date, 3 canceled / missing return_date, 2 completed / populated return_date, and 2 rows with both fields missing. The filter WHERE return_date IS NULL AND status <> 'Canceled' requires both conditions to be TRUE. First, return_date IS NULL filters to the 10 rows missing a return date (5 completed + 3 canceled + 2 with missing status). Then status <> 'Canceled' is applied: the 5 completed rows pass (TRUE), the 3 canceled rows fail (FALSE), and the 2 rows with NULL status produce UNKNOWN — SQL excludes UNKNOWN rows just like FALSE rows. That leaves exactly 5 rows, confirming answer A is correct.
Answer B (seven rows) likely comes from adding the 5 completed rows to the 2 NULL-status rows, forgetting that UNKNOWN fails the WHERE clause. Answer C (eight rows) may reflect incorrectly including the 3 canceled rows, misreading <> as =. Answer D (ten rows) ignores the second condition entirely and counts all rows with a missing return_date.
Your study tip: always remember that in SQL, NULL compared to any value — even using <> — returns UNKNOWN, and WHERE clauses silently drop UNKNOWN results. When you see NULL-status rows, they will never satisfy an equality or inequality filter.A query first retains event timestamps greater than or equal to July 1 at 12:00 a.m. UTC and strictly earlier than August 1 at 12:00 a.m. UTC. It then creates a business_date by subtracting four hours from each retained timestamp. E1 occurred July 1 at 2:00 a.m. UTC; E2 occurred July 31 at 11:00 p.m. UTC; E3 occurred August 1 at 12:00 a.m. UTC; and E4 occurred June 30 at 11:00 p.m. UTC.
Which events and derived business dates appear in the output?
business_date. E1's timestamp (July 1 at 2:00 a.m. UTC) minus four hours = June 30 at 10:00 p.m., which falls on June 30. E2's timestamp (July 31 at 11:00 p.m. UTC) minus four hours = July 31 at 7:00 p.m., which stays on July 31. That gives you E1 dated June 30 and E2 dated July 31 — confirming D.
Choice A incorrectly includes E4, which was excluded by the filter. Choice B incorrectly includes E3, which fails the strict upper-bound check, and drops E1. Choice C keeps E1 and E2 correctly but assigns E1 the wrong date (July 1 instead of June 30), showing the four-hour subtraction was not applied.
The key trap here is forgetting that strict inequalities exclude boundary values, and that the date shift can push an event into the prior calendar day — always apply the offset before reading the date.A marketing dataset is processed by first retaining online-channel rows. Missing spend is then replaced with the median of the observed spend values among those retained rows. Finally, rows with spend greater than or equal to that median are kept. The online rows are O1 with spend 10, O2 with missing spend, O3 with spend 30, and O4 with spend 50. Two offline rows have spend values of 100 and 200.
Which online rows remain after the complete transformation?
An order file contains O1 and O3 as completed orders and O2 as canceled. A line-item file contains two lines for O1 worth 60 and 40, one line for O2 worth 200, and three lines for O3 worth 30 each. The analyst must report average completed-order revenue, giving each completed order equal weight.
Which transformation and result meet the requirement?
A wide product file has separate Q1, Q2, and Q3 sales columns. Product A has values 100, 120, and missing. Product B has values 80, missing, and 100. The analyst unpivots the file into product-quarter rows, discards rows with missing sales, sorts each product chronologically, and computes growth from the immediately preceding retained row.
What output size and growth value result for Product B's Q3 row?
A customer snapshot file may contain multiple rows per customer. The analyst sorts each customer's rows by effective date descending, retains the first row, and only then filters for status = 'Active' and balance greater than 100. Customer A has an older active row with balance 300 and a newer inactive row with balance 200. Customer B's newest row is active with balance 150. Customer C has an older active row with balance 500 and a newer active row with balance 90.
Which customers remain after the stated sequence of operations?
status = 'Active' AND balance >100. The key insight is that the filter applies after the snapshot is reduced to one row per customer — so only the most recent row matters, regardless of what older rows contain.
Customer A: The most recent row is inactive with balance 200. It fails the status filter. Customer A is removed.
Customer B: The most recent row is active with balance 150>100. Both conditions pass. Customer B survives.
Customer C: The most recent row is active but has balance 90≤100. It fails the balance filter. Customer C is removed.
Only Customer B remains, making A the correct answer.
Choice B is wrong because it includes Customer A — a tempting trap if you assume the older active row with balance 300 is evaluated, but it isn't; the newest row wins. Choice C is wrong for the same structural reason applied to Customer C: the newer active row at 90 fails the balance threshold, so the older 500 row is irrelevant. Choice D incorrectly assumes all rows across all customers are eligible, ignoring the deduplication step entirely.
Study tip: On operations-sequencing questions, trace each customer through every step in order — never skip ahead to the filter and work backward.An A/B test transformation retains each user's earliest experiment assignment, discards purchase events occurring before that assignment, and marks a user as converted if at least one purchase occurs within seven days after assignment. U1 was assigned A on January 1 and purchased on January 3 and January 4. U2 was assigned A on January 1 and purchased on January 10. U3 purchased on January 1, was assigned B on January 2, and purchased again on January 8. U4 was assigned B on January 1 and made no purchase. U5 was assigned A on January 1, was reassigned to B on January 2, and purchased on January 3.
After transforming to one record per user, what are the conversion results by retained variant?
A product dataset contains the following records, stated as product, margin score, and revenue: P, 30, 100; Q, 30, 120; R, 25, 200; S, 30, 120; T, 25, 250; and U, 30, 90. An analyst sorts by margin score descending, then revenue descending, and finally product name ascending.
Which ordered sequence contains the first three products after the sort?
A sales transformation first retains records with quantity of at least 10. It then defines net revenue as zero for returned transactions and, for all other retained transactions, as quantity×price×(1−discount). Four records are processed: R1 has quantity 12, price 10, discount 0.10, and is not returned; R2 has quantity 9, price 20, no discount, and is not returned; R3 has quantity 15, price 8, no discount, and is returned; R4 has quantity 10, price 12, discount 0.25, and is not returned.
After the filter and transformation, which result is correct?
A sales-representative dataset is first filtered to active representatives. In the East region, A is active with sales of 100, B is inactive with sales of 100, C is active with sales of 90, and G is active with sales of 80. In the West region, D is active with sales of 120, while E and F are active with sales of 110 each. Within each region, the analyst assigns descending dense ranks and retains ranks of at most 2.
Which representatives are retained?