/* SQL Fundamentals LOGICAL OPERATORS: AND, OR, NOT */ /* AND Operator: Show employees who are female AND have 'Marketing Specialist' as their job title. Show the Business Entity ID, organization level, job title, and gender */ select BusinessEntityID, OrganizationLevel, JobTitle, Gender from AdventureWorks2008.HumanResources.Employee where Gender = 'F' AND JobTitle = 'Marketing Specialist'; /* Show all employees who have 'Marketing Specialist' as their job title. Show the Business Entity ID, organization level, job title, and gender */ select BusinessEntityID, OrganizationLevel, JobTitle, Gender from AdventureWorks2008.HumanResources.Employee WHERE JobTitle = 'Marketing Specialist'; /* OR Operator: Show employees who are marketing assistant OR marketing specialist. Show the Business Entity ID, organization level, and job title. */ select BusinessEntityID, OrganizationLevel, JobTitle from AdventureWorks2008.HumanResources.Employee where JobTitle = 'Marketing Assistant' OR JobTitle = 'Marketing Specialist'; /* Show employees who are application specialist OR marketing specialist AND vacation hours are greater than 73 or marital status = 'M" (married). Show the Business Entity ID, job title, vacation hours and marital status. */ select BusinessEntityID, JobTitle, VacationHours, MaritalStatus from AdventureWorks2008.HumanResources.Employee where (JobTitle = 'Application Specialist' OR JobTitle = 'Marketing Specialist') AND (VacationHours > 73 or MaritalStatus = 'M');