LinkedIn’s recommendation engine needs to highlight "Top Applicants" for recruiters. A top applicant is defined as someone who possesses at least 80% of the skills listed as required for a job.
Write a query to find all such users for Job ID 1001.
Rules:
- Only consider skills that are explicitly listed as required for Job ID 1001 in the job_requirements table.
- A user must have the exact skill name (case-sensitive) in the user_skills table to count as a match.
- The match percentage should be calculated as: (number of matching skills / total number of skills required for the job).
- Only return users with a match percentage >= 80%.
- Output columns: user_id, matched_skills_count, match_percentage.
- Result must be sorted by match_percentage descending, then user_id ascending.