Chatham Financial interview question

SQL query for selecting particular records.