this should be a left join IMO, otherwise you exclude threads without messages