I need a script that will filter a database table based on five fields and return the best "matched" field based on set defaults.
Like if field 1 = 'yes' and field 2 = yes... and so on.
Please download attached file with sample database structure and data.
- You will need to group rows by "id" and "similar". You will filter the results for the current row id against the ids found in the column called "similar".
- Columns "rank" and "did" will be unique per group of id/did.
- It must return at least one id after all the filters. Basically if there is no match just return any id from the group.
Very simple script. Needs to be done today. Please PM Questions.