The SQL statement provided selects data from multiple tables joined together, including Reps, Customers, Call Types, and Calls. A WHERE clause is suggested to be added to the end to filter the results from the Calls table to only include records where the Customer Satisfaction rating is less than 3.
Add a WHERE clause to the end of the existing SQL that selects records.pdf
1. Add a WHERE clause to the end of the existing SQL that selects records from the Calls table
with a Customer Satisfaction rating of less than 3.
The SQL statement :
SELECT [Reps].[RepFirst], [Reps].[RepLast], [Customers].[CompanyName], [Call
Types].[Description], [Calls].[HoursLogged], [Calls].[OpenedDate], [Calls].[ClosedDate],
[Calls].[CustomerSatisfaction] FROM Reps INNER JOIN (Customers INNER JOIN ([Call
Types] INNER JOIN Calls ON [Call Types].[CallTypeID] =[Calls].[CallTypeID]) ON
[Customers].[CustomerID] =[Calls].[CustomerID]) ON [Reps].[RepID] =[Calls].[RepID]
SELECT [Calls] WHERE[CustomerSatisfaction] < 3;