Question: Assume that Flags are 0 and 1. Please note all other assumptions with inline code comments. a. Write a SQL query that will show them

Assume that Flags are 0 and 1. Please note all other assumptions with inline code comments.
a. Write a SQL query that will show them one value which represents the number of employees with more than 150 hours accrued vacation.
b. Write SQL ONE query that returns two rows: The first is a count of salaried employees with over 125 hours accrued vacation and the second result row is the count of non-salaried employees with over 125 hours accrued vacation.
c. Please write a SQL query that the administrative assistant can use to create mailing labels for their HOME address and fill in some variables for a form letter. Assume your query result window will allow the results to be saved to a tab delimited file format that the admin can import and auto-create labels/letters. The format should be as follows: EmployeeID, LoginID, Mr or Mrs, HireDate, VacationHours, AddressLine1, AddressLine2, City+State+Zip. Please sort the results by City Name in ascending alphabetical order. NOTE: Legal has confirmed non- salaried employees are not subject to accrual limits and should therefore NOT be included in the result set.
Employee EmployeeAddress PK EmployeelD Address PK EmployeelD PK AddressID PK AddressID ContactID LoginID Title Gender HireDate BirthDate SalariedFLG VacationHours SickLeaveHours CurrentFLG ModifiedDate MaritalStatus AddressLine1 AddressLine2 City StateProvincelD PostalCode ModifiedDate AddressDate AddressType
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
