adding nested query pic