RJ Softwares interview question

how can query run