Fresher interviews often probe whether you can validate joins, aggregations and buggy code—not whether you memorised exotic syntax lists.

Key points

  • State grain before you aggregate; joins can multiply rows and inflate sums
  • Prefer readable SQL (CTEs) you can defend over clever one-liners
  • In Python, trace failures with inputs, expected outputs and edge cases—not library trivia alone

Illustrative example

Illustrative exercises for teaching clarity — not interview guarantees or SkillsNCR outcome claims.

Tiny teaching datasets — customers(id, name, credit_limit): (1, Ana, 1000), (2, Ben, 500); orders(id, customer_id, amount): (10, 1, 100), (11, 1, 50), (12, 2, 200).

Exercise 1 — Duplicate join inflation (SQL)

Bug pattern: SELECT SUM(credit_limit) FROM customers c JOIN orders o ON c.id = o.customer_id. Actual result: 2500 (Ana’s 1000 counted twice). Expected if you meant sum of customer credit limits: 1500. Fix idea: aggregate or distinct at customer grain first.

SELECT SUM(credit_limit) AS total_credit
FROM customers;
-- expected: 1500

Expected: 1500

Exercise 2 — Aggregation grain (SQL)

Using orders above, average spend per customer:

SELECT AVG(customer_total) AS avg_spend
FROM (
  SELECT customer_id, SUM(amount) AS customer_total
  FROM orders
  GROUP BY customer_id
) t;

Expected: 175

Exercise 3 — Window function (SQL)

SELECT id, customer_id, amount,
       SUM(amount) OVER (PARTITION BY customer_id) AS customer_lifetime
FROM orders
ORDER BY id;

Expected: rows (10, 1, 100, 150), (11, 1, 50, 150), (12, 2, 200, 200)

Exercise 4 — Python debugging

def running_total(nums):
    total = 0
    out = []
    for n in nums:
        total += n
        out.append(total)
    return out

assert running_total([3, -1, 2]) == [3, 2, 4]
  • Buggy variant often seen: appending n instead of total → [3, -1, 2] (wrong).
  • Empty list expected: []. Single element [5] expected: [5].

How WorkReady practises this

WorkReady 90’s SQL and Python practice centres on diagnosing imperfect queries and scripts with review—similar to how interviewers probe reasoning, without claiming any particular question “always” appears.

Want to discuss whether WorkReady fits your situation?

SkillsNCR WorkReady is paid professional capability development. Talk through fit, format and schedule before any enrolment decision.

Explore SkillsNCR WorkReady