In Progress

Simple MySQL database processing algorithm - repost 2


I have a MySQL database of historic horse racing results. I want to run processes that will make racing selections. They will first need to select and eliminate races on the basis of eligibility criteria. Then they will select horses from the qualifying races on the basis of their previous results. This process will involve searching through the database, matching on the name of the horse, and then performing a calculation based on values for this race and the previous races it ran in. The script needs to produce a report including the results and profit or loss of the system.

The manual describing the database is available at:

[url removed, login to view]

I want to remain flexible on the details of exactly how the calculation is made and so I will need to be able to edit the code myself. The code will be in SQL. I also require assistance with extracting data to Excel and creating a new database that is a fragment of the current one. I have shared the structure of the database here:

It may be possible to provide some sample data but I will need help in providing this.

Skills required: SQL, An interest in horse racing is desirable but not essential.


1. Explain how to produce a fragment of the database (which may be used for development purposes).

2. Output the data in historic_runners in to separate Excel files for each year of the data.

3. Distance and Going Project

a. Select races in a particular date range and of a particular type.

b. Select horses that have performed well in each of their preceding races (either won or finished in the first quarter of the field) and which have only run over a greater distance than the race under consideration, or which have only run over a lesser distance than the race under consideration. (A horse that has run over both a greater and lesser distance is does not qualify on this basis) or which have only run over softer, or only over firmer ground, than the going in the race under consideration (a horse that has run over both softer and firmer ground does not qualify on this basis.)

4. Handicap rating project

a. Filter on type of race in which to bet (handicaps only, not All weather (AW)).

b. Filter on type of race in which to make a calculation (again only handicaps and not AW, also must be within a certain date range, say one year, of the race under consideration.)

c. A table needs to be constructed for a multiplying factor used in the calculation that depends of the length of each form race.

d. Calculate a value for each horse based on this formula:

V = ORf – ORt - (F*D(lengths))


ORf is the Official rating of the form race

ORt is the Official rating of the race under consideration. (“Today’s race.”)

F is the factor that depends on the length of the face.

D is the distance in lengths the horse finishes behind the third place horse (this value will be zero for horses which finished third, and negative for horses which won or finished second.)

The horse with the highest rating for any of its eligible races is the selection for the race.

5. For both systems produce a report of the result of betting on each selected horse, which is displayed in the command window and output to an excel spread sheet.

Please let me know if you have any other questions.

Skills: MySQL

See more: want excel spread sheet, type of searching in data structure, simple data structure, searching in data structure, searching data structure, searching algorithm in data structure, searching algorithm in c, searching algorithm, process of algorithm development, make a spread sheet, make algorithm, how to make an algorithm, how to make algorithm, how to algorithm, horse racing script, highest rating, formula rating, explain data structure, explain algorithm, essential selection criteria, development of algorithm, data structure searching, data structure and algorithm in c, Data Structure and algorithm, data structure algorithm in c

About the Employer:
( 2 reviews ) Brighton, United Kingdom

Project ID: #4675207

Awarded to:


Hi, I'm very comfortable with SQL and can provide you the SQL code and the EXCEL file output also. Thank you.

$122 USD in 3 days
(2 Reviews)

9 freelancers are bidding on average $179 for this job


Greeting from Lucent Innovation...!!! pls check PMB Thanks Lucent Innovation

$263 USD in 7 days
(7 Reviews)

Hi, I am working as a Database designer and developer for 7+ years using sql server, oracle, mysql and ms access.I have working knowledge of designing and implementing database schema and writing efficient query, sto More

$166 USD in 3 days
(1 Review)

Ready to work on this please check pm

$222 USD in 7 days
(9 Reviews)

Sir i can provide you this work . I have done alot of work with databases and algorithms . Looking forward to work with you.

$200 USD in 3 days
(3 Reviews)

Hi, I am interested in the the task that you posted. I am SQL server DBA and C# Developper, I created some small project in my local area for learning. I'm skilled in Ms sql and I love doing things perfectly More

$150 USD in 3 days
(1 Review)

I specialise in MySQL databases, often in concert with Python, Ruby, PHP and the like. I don't have a huge interest in horse racing, but am keen on statistics, and combinations and permutations.

$222 USD in 14 days
(0 Reviews)

We can do this.

$111 USD in 3 days
(0 Reviews)

Have more than 2 years of experience working on MySQL database. Can get this done using MySQL stored procedures alone, no external programming language will be required.

$155 USD in 3 days
(0 Reviews)