Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

tblAddress tblCompany CompanylD CompanyName BillingAddressID IsCustomer Customer

ID: 3729727 • Letter: T

Question

tblAddress tblCompany CompanylD CompanyName BillingAddressID IsCustomer CustomerVenderSince DateLastModified AddressID AddressLinel AddressLine2 City StateProvince PostalCode Country tblProduct ProductID ProductName CurrentStandardUnitPrice tblorderLine OrderNo ProductID tblEmployee EmployeelD tblCustomerOrder OrderNo OrderDate FilledYesNo CompanylD ShippingAddressID EmployeelDTookOrder EmployeelDFilledOrder LastName FirstName UserName UserPassword Phone SupervisorID JobPositionID QuantityOrdered UnitPriceCharged DiscountRate QuantityPicked tblJobPosition JobPositioniD JobTitle Very Important Note about the diagram tblCompany contains customers and vendors but mainly customers IsCustomer of tblCompany contains C for the company's customers and V for the company's vendors CustomerVenderSince is a DateTime field to store date and time the company record was entered FilledYesNo field of tblCusotmerOrder has Y or N. Y means all of the ordered products on the customer order were shipped. N means at least one of the ordered products on the customer order has not been shipped yet .

Explanation / Answer

Follow steps mentioned to connect to database using Sql server management studio.

Then execute below queries and get the results.

a.

SELECT EmployeeId, JobPositionID, Username, UserPassword
FROM tblEmployee
WHERE Username = 'ismhao9' AND UserPassword = 'ism136ao9'

b.

SELECT EmployeeId, CONCAT(FirstName,' ', LastName) AS EmployeeFullName, JobPositionID
FROM tblEmployee
WHERE EmployeeId = 50

C.

SELECT JobPositionID, JobTitle
FROM tblJobPosition
ORDER BY JobTitle

d.

SELECT EmployeeId, CONCAT(LastName, ' ', FirstName) AS SupervisorName, JobPositionID
FROM tblEmployee
Order BY LastName, FirstName

Note: Answered first four points