I have some surveys that need to be compared with a "global total" for each one:
If the survey was made by two persons, I need to take the highest position score, then if two positions of the same level surveyed I need to take the last one's score (by date) and if the same day two positions of the same level surveyed I need to take the highest score.
Each evaluation for each customer.
I'm kind of stuck here, I have an ID for each survey, I have the person ID, the customer ID, and the date.
With the Survey ID I get the score.
With the Person ID I get the position level.
With the Customer ID I get the zone, and region information.
With the Date I get the period of each survey.
|Sector||Cliente||AnswerID||Score||Total Surveys||Get Max job and date max score||Date(Max(Fecha))|
|COM1N5||11139025 - Pizza 1969||68.75||2||91.67||17/06/2014|
|11067202 - International Food Company S A S||92.99||2||10/06/2014|