We have to use these aliases everywhere in the query, so rewrite the condition.
Make sure to pick s.id = m.id.
s.id = m.id