Coforge Interview Question

prime number and some basic sql queries