Need help with an SQL query

Original text of this message