fixed query for CRM-13147
Merge pull request #1303 from yashodha/CRM-13147

fixed query for CRM-13147