MedCo (AL) Interview Question

Write SQL query