What should be SQL query to retrieve the following info?

Original text of this message