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

Please help write the problem below in SQL using the relationships and tables be

ID: 3809362 • Letter: P

Question

Please help write the problem below in SQL using the relationships and tables below:

Projects V ProjectID ProjectName ProjectAssignments EmployeeID ojectID Customers customerID -1 firstname ast name Street1 Street2 City Employees EmployeeID Firstname Lastname Department JobClass SupervisorID Start Date EndDate Pay Rate Pay Type Pay Account Hours PostedThisWeek AccruedSickLeave Taken SickLeave Orders order Number CustomerID OrderDateTime PaymentType Amount Departments Department Accounts V Account Number Title ContractNumbe Begin Date Sales Contacts Contact ID Firstname Last name Street1 Street2 City State Zip

Explanation / Answer

1. SELECT lastname,firstname,OrderNumber,OrderDateTime,estimatedshipdate,PaymentType,Amount from customers INNER JOIN orders ON customers.CustomerId=orders.CustomerId.

2.SELECT * from orders WHERE NOW() >= (GetDate() - 90).

3. SELECT FORMAT(OrderDateTime,'yyyy-mm-dd %H') FROM orders;

4. SELECT LTRIM(RTRIM(LCASE(firstname lastname))) FROM customers.