NetLine interview question

Database queries based on an assumed system