MySQL Data Cleaning PHP Script

Job ID: 39378697

Budget: $30 – $250 USD

I need a PHP script to clean MySQL data for a table with 160,000 records. The script should be executed manually via a clickable link.

Requirements:

- Group records by "user_id".
- If a group has 12 or fewer records, leave them unchanged.
- If a group has more than 12 records, sort by "record_id" (highest to lowest) and delete records 13 onwards, keeping the first 12.

No backup is necessary and no confirmation prompt is required before deletion.

Ideal Skills and Experience:
- Proficient in PHP and MySQL
- Experience with data manipulation and record deletion
- Ability to write efficient scripts for large datasets
- Familiarity with manual execution of scripts via web links

Access to the site and database will be provided.