Oracle interview question

Prime number code in preferred language, SQL query on group by.