Sanjaay Gowda T S
PepsiCo, Inc. practice

ORIGINAL COMPANY-CONTEXT PRACTICE

Measure synthetic on-shelf availability without visit bias

SQL & data engineeringMediumConcept

Original practice scenario: A retail simulator records shelf audits at irregular times and extra visits to troubled stores. How would you summarize availability?

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

A REASONED APPROACH

Model answer.

An audit-row average measures observations, not automatically store-time availability. Extra visits to problematic stores change the sample, so the denominator must match the intended reporting question.

Work through it

  1. Define the target as sampled-visit availability or estimated store-time exposure, retaining visit reason, timestamp, product and store identifiers.
  2. Deduplicate repeated audits within the chosen observation unit and use an explicit weighting or sampling design if estimating a broader population.
  3. Report coverage and missingness by store and period, compare routine and exception visits, and test products absent from an audit separately from recorded stockouts.

Tradeoffs to discuss

  • Routine-only samples improve comparability but omit useful exception information; combining both requires transparent assumptions.

Common pitfalls

  • Do not interpret an unrecorded product as available or unavailable by default.
  • A SQL calculation cannot remove selection bias that the data collection design does not identify.

KEEP PRACTISING

Related questions.

Keep learning beyond the interview.

Explore the Learning Hub