Can anyone figure out this MySQL query?

Original text of this message