PT2520
Lab 6.1 & 6.2
6.1
4
2
Select * from Patients select Firstname, LastName, PhoneNumber from Patients select LastName from Patients where DoctorKey = 123 there were 2 patients with that dorctor key.
3
1
51 employees have vacation time and are on salary.
51
select * from HumanResources.Employee where VacationHours > 0 or SickLeaveHours > 0
124
Order by vacationhours27
14678
A break down of the vacation hours for each employee level. select OrganizationLevel, avg(vacationhours) as Average FROM HumanResources.Employee Group by OrganizationLevel0 select * from HumanResources.Employee where JobTitle like 'Research%' order by DESC
6.2
select * RequestID From SoftwareRequestsselect * RequestID from SoftwareRequesrs where Pending = yes select * RequestID from SoftwareRequests where RequestedSoftware = <software requested> select SoftwareName, RoomNumber, Computer from InstalledSoftwareselect * from Software where softwarename = ‘%office%’ same as above with an “or vendorname = Microsoft” tacked on to the end select softwarekey, copies from installed software group by software key select * from LicenseType where LicenseTypeEnd < date select LisenceTypeName, sum(licenseTypeEnd) from LicenseType Where LicenseTypeEnd < date> Order by LicenseTypeNameselect Price from licenseType order by count