Coforge interview question

prime number and some basic sql queries