created search query for multiple tables