JK Tech Interview Question

SQL query for finding second highest salary? Type of drivers? Prime Number program.