"for" is right. The querying happens afterwards.