← All tables and views

AdventureWorks OLTP view

HumanResources.vEmployeeDepartment

Native view in the AdventureWorks OLTP sample database.

290rows

10 columns

Schema from the provider contract
ColumnTypeNullableKeyReferences
BusinessEntityIDyes——
Titleyes——
FirstNameyes——
MiddleNameyes——
LastNameyes——
Suffixyes——
JobTitleyes——
Departmentyes——
GroupNameyes——
StartDateyes——

View definition

CREATE VIEW "HumanResources.vEmployeeDepartment" AS
SELECT
    e."BusinessEntityID"
    ,p."Title"
    ,p."FirstName"
    ,p."MiddleName"
    ,p."LastName"
    ,p."Suffix"
    ,e."JobTitle"
    ,d."Name" AS "Department"
    ,d."GroupName"
    ,edh."StartDate"
FROM "HumanResources.Employee" e
	INNER JOIN "Person.Person" p
	ON p."BusinessEntityID" = e."BusinessEntityID"
    INNER JOIN "HumanResources.EmployeeDepartmentHistory" edh
    ON e."BusinessEntityID" = edh."BusinessEntityID"
    INNER JOIN "HumanResources.Department" d
    ON edh."DepartmentID" = d."DepartmentID"
WHERE edh.EndDate IS NULL

Data preview

Sample records

290 rows available
BusinessEntityIDTitleFirstNameMiddleNameLastNameSuffixJobTitle
1NULLKenJSánchezNULLChief Executive Officer
2NULLTerriLeeDuffyNULLVice President of Engineering
3NULLRobertoNULLTamburelloNULLEngineering Manager
4NULLRobNULLWaltersNULLSenior Tool Designer
5Ms.GailAEricksonNULLDesign Engineer
6Mr.JossefHGoldbergNULLDesign Engineer
7NULLDylanAMillerNULLResearch and Development Manager
8NULLDianeLMargheimNULLResearch and Development Engineer