My table contains records for timesheets. Each timesheet is analysed by consultant and can have several records, indicating the percentage allocated to each consultant (field "cons"). Table is in FoxPro 2.6 format.
For each timesheet (field is "tsno") I want to find the value of field "cons", for which the "perc" value is highest.
Example source table:
tsno perc cons
1 95 A
1 5 B
2 100 C
3 50 B
3 50 D
Desired output:
tsno cons
1 A
2 C
3 could be B or D - I am not bothered which where they are equal
How can I achieve this please?
Start Free Trial