Answer
See the explanation
Work Step by Step
Certainly! Here's the SQL query to retrieve the Name and JobTitle of each current employee:
```sql
SELECT Employee.Name, Employee.JobTitle
FROM Employee
JOIN EmploymentHistory ON Employee.EmployeeID = EmploymentHistory.EmployeeID
WHERE EmploymentHistory.EndDate IS NULL;
```
Explanation:
1. **SELECT Employee.Name, Employee.JobTitle**: This selects the Name and JobTitle columns from the Employee table.
2. **FROM Employee**: Specifies the table from which to retrieve the data.
3. **JOIN EmploymentHistory ON Employee.EmployeeID = EmploymentHistory.EmployeeID**: Joins the Employee table with the EmploymentHistory table based on the common EmployeeID column.
4. **WHERE EmploymentHistory.EndDate IS NULL**: Filters the results to include only current employees by checking if the EndDate in the EmploymentHistory table is NULL, indicating that the employee is currently employed.