Given a database with employee and department tables, write a SQL query to find the second highest salary in each department.