I need some major help. I have a query (see below) that returns survey results... For some reason, some surveys get submitted multiple times. What I need is (for the past 90 days) just the newest result from each of the users. Does this make sense? If not,
I can try to clarify.
SELECT OneClickSurvey.OneClickSurveyID as 'Survey ID',
Customer.FullName as 'Customer', OneClickSurvey.UsersID as 'User ID', Users.FirstName + ' ' + Users.LastName as 'User',
OneClickSurvey.SurveyDate as 'Date', DATENAME(dw, OneClickSurvey.SurveyDate) as 'Survey Day',
(select FirstName + ' ' + LastName from Users where Customer.PSAcctMngr = Users.UsersID) as 'Account Manager',
(select FirstName + ' ' + LastName from Users where Customer.PSSupportMngr = Users.UsersID) as 'Support Manager',
(select FirstName + ' ' + LastName from Users where Customer.PSServiceMngr = Users.UsersID) as 'Service Manager'
FROM Customer INNER JOIN
UsersCustomer ON Customer.CustomerID = UsersCustomer.CustomerID INNER JOINa
Users ON UsersCustomer.UsersID = Users.UsersID INNER JOIN
OneClickSurvey ON UsersCustomer.UsersID = OneClickSurvey.UsersID
-- Get last day's
View Complete Post