added query to get friend id for book recommendation