IMC Interview Question

Expand a querying function