DoorDash Interview Question

Walk me through this sql query