RJ Softwares interview question

write down a query