--CTE
WITH employee_CTE AS (
	SELECT BusinessEntityID, Jobtitle, Gender, HireDate
	FROM [HumanResources].[Employee]),

	person_CTE AS(
	SELECT BusinessEntityID, Title, FirstName, LastName
	FROM [Person].[Person])


SELECT E.BusinessEntityID, Jobtitle, Title, FirstName, LastName, Gender, HireDate
FROM employee_CTE as E
INNER JOIN person_CTE AS P
ON E.BusinessEntityID = P.BusinessEntityID


