Sanjaay Gowda T S
Merck & Co., Inc. practice

ORIGINAL COMPANY-CONTEXT PRACTICE

Report usable inventory by expiry and disposition state

SQL & data engineeringHardConcept

Original practice scenario: A hypothetical pharmaceutical supply dashboard tracks lots, transfers, expiration dates and quarantine decisions. Explain how to calculate an as-of inventory view without making a product-use decision.

Written for independent practice using company context; this is not a verified question from a company interview.

A REASONED APPROACH

Model answer.

Calculate stock from identified movements and report disposition separately. An expiration comparison alone does not establish whether a lot is available, released, quarantined or otherwise restricted.

Work through it

  1. Aggregate receipts, transfers, consumption and authorized adjustments at lot-location grain, using the movements known by the reporting cutoff.
  2. Join the effective lot expiry and reviewed disposition state without multiplying movements, preserving missing or conflicting attributes as exceptions.
  3. Show quantities by declared expiry bands and disposition categories, reconciling the sum with physical stock controls and recording the snapshot version.

Tradeoffs to discuss

  • A current-state dashboard is convenient for operations, while historical replay needs effective dates and knowledge-time records for corrections.

Common pitfalls

  • Do not count a transfer simultaneously as new global stock and a destination receipt.
  • The technical report must not override authorized release rules or infer permission to use a product from date arithmetic alone.

KEEP PRACTISING

Related questions.

Keep learning beyond the interview.

Explore the Learning Hub