Siemens interview question

Asked to write an SQL query.