The 500 sample records have been pulled in from https://www.briandunning.com/sample-data/. This demo file could have been designed to just delete the first or last 250 records, or even delete every other record but this is a little more involved and pretty cool.
The website RANDOM.ORG fully randomizes the record numbers that are deleted, there are other API’S on their site and all pretty cool. You’ll need to setup a free account that gives more than enough requests to play around. Create your account and setup your basics API Key from here. The API being used is called generateIntegers found here. Once you have the API key enter it where you see in the image below.
The generateIntegers call lets you pass how many records you need, in this case 250. With a minimum start number of 1 and maximum number of 500 and returns 250 random digits between those. This demo file uses the number of records in the table divided by two for the records needed.
Clicking Snap Fingers calls the API with returns random numbers back. The script then goes to record by record number and deletes the record until it has gone through all the integers.