SIMULATION
You have a database that contains the following tables.
You need to create a query that returns each complaint, the names of the employees handling the complaint, and the notes on each interaction. The Complaint field must be displayed first, followed by the employee’s name and the notes. Complaints must be returned even if no interaction has occurred.
Construct the query using the following guidelines:
– Use two-part column names.
– Use one-part table names.
– Use the first letter of the table name as its alias.
– Do not use Transact-SQL functions.
– Do not use implicit joins.
– Do not surround object names with square brackets.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it.
Answer: 1 SELECT c.Complaint, e.Name, i.Notes
2 FROM Complaints c
3 LEFT JOIN Interactions i ON c.ComplaintID = i.ComplaintID
4 LEFT JOIN Employees e ON i.EmployeeID = E.EmployeeID
Complaints must be returned even if no interaction has occurred, so we must use the LEFT JOIN, instead of just JOIN.
Note: You can drop the OUTER in LEFT OUTER JOIN, as has been done here on line 3 and line 4.
Latest 70-761 Dumps Valid Version with 212 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund