Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Synth to Natural Dirt and Natural Dirt to Synth in SQL Mode - How To

Home Register
Log In
By Synth to Natural Dirt and Natural Dirt to Synth in SQL Mode - How To
jeff
4/21/2010
2:05:36 AM
--quote:

Hey J,
Have you ever made a synth to dirt and dirt to synth SQL impression? I am not sure but I do not think you have a "synth only" surface in the new version do you? I only see D and T.
Anyway, if you have written one I would love to do some datamining.
D

--end quote--



First, natural dirt last start to synth surface today:


query start: 4/20/2010 8:08:05 PM
query end: 4/20/2010 8:08:06 PM
elapsed time: 1 seconds
`
Data Window Settings:
999 Divisor Odds Cap: None
`
SQL: SELECT * FROM STARTERHISTORY
WHERE INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACKLAST) = 0
AND INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACK) > 0
AND INTSURFACE <= 3
AND SFSHIFT <= 3
`
`
Data Summary Win Place Show
Mutuel Totals 746.80 757.00 867.10
Bet -1138.00 -1138.00 -1138.00
Gain -391.20 -381.00 -270.90
`
Wins 77 142 220
Plays 569 569 569
PCT .1353 .2496 .3866
`
ROI 0.6562 0.6652 0.7620
Avg Mut 9.70 5.33 3.94


Explanation:

WHERE INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACKLAST) = 0

AND INTSURFACE <= 3

The above two lines create the constraint that the horse raced on a natural dirt surface last out.

Here, I'm using the INSTR command to compare a list of track codes (All of the track codes used are those with synth surfaces) to the track code value sitting in the TRACKLAST field of the starterhistory table. The = 0 condition means that no match was found... or put another way, values read from the table in the TRACKLAST field were something other than the list of track codes used: KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID.

That takes care of track codes. But we still have to deal with surface. Here I'm using the INTSURFACE field (always get your field names from the table schema) to ensure that races being evaluated weren't run on turf. The <= 3 value takes care of that.

The next two lines create the constraint that the horse is racing on a synth surface today:

AND INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACK) > 0

AND SFSHIFT <= 3

Here again I'm using the INSTR command. But this time I'm using it to compare the track code list to the track field... which means I'm dealing with today's track.

The > 0 part means that a match was found... or that today's track code is in fact one of the track codes from the track code list.

Unfortunately, there is only room in the table for 255 fields. So I didn't have room to add an intsurfacelast field.

Not to worry though. We can still compare surface in last to surface today using Surface Shift... or the SFSHIFT field.

A peek at the Surface Shift values shown on the JCapper Supported Factors page shows that SFSHIFT <= 3 would get you any and all combinations of moves from one dirt course to another... synth included.

That gets you Natural Dirt to Synth.


-jp

.


~Edited by: jeff  on:  4/21/2010  at:  2:05:36 AM~

Reply
jeff
4/20/2010
11:36:44 PM
To do synth last out to natural dirt today, use the following SQL Expression:

query start: 4/20/2010 8:32:50 PM
query end: 4/20/2010 8:32:52 PM
elapsed time: 2 seconds
`
Data Window Settings:
999 Divisor Odds Cap: None
`
SQL: SELECT * FROM STARTERHISTORY
WHERE INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACKLAST) > 0
AND INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACK) = 0
AND INTSURFACE <= 3
AND SFSHIFT <= 3
`
`
Data Summary Win Place Show
Mutuel Totals 1467.60 1270.70 1251.50
Bet -1712.00 -1712.00 -1712.00
Gain -244.40 -441.30 -460.50
`
Wins 165 286 369
Plays 856 856 856
PCT .1928 .3341 .4311
`
ROI 0.8572 0.7422 0.7310
Avg Mut 8.89 4.44 3.39




-jp

.

Reply
jeff
5/23/2010
12:48:01 PM
--quote:

jeff, show me how to do synth to turf, turf to synth.

--end quote--



We can use the sql expressions from the above posts as a starting framework.

First, Synth Last Out to Turf Today:
We'll need to change the numeric values for INTSURFACE and SHSHIFT. Instead of dirt values above we'll need to change them to turf values as shown below.

1. Turf values for INTSURFACE are 4 and 5

2. Dirt to Turf values for SFSHIFT are 8 to 11

3. We'll also need to remove the second INSTR command from the framework expression because there is no longer a need to enforce a track code match for today's race. We only need to enforce an intsurface code match of 4 or higher to get turf races today.

Our sql expression for Synth to Turf becomes:

SELECT * FROM STARTERHISTORY WHERE INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACKLAST) > 0
AND INTSURFACE >= 4
AND SFSHIFT >= 8
AND SFSHIFT <= 11



-jp

.

~Edited by: jeff  on:  5/23/2010  at:  12:48:01 PM~

Reply
jeff
5/23/2010
12:58:01 PM
Turf Last Out to Synth Today:

1. SFSHIFT values are 4-7

2. INTSURFACE value is 3 or less

2. We no longer need a track code match for the track last out.

3. We do need a track code match for today's track to ensure the horse is running on a synthetic surface today.

The following sql expression will cause a UDM to "grab" horses that were Turf Last Out running on Synth Today:

SELECT * FROM STARTERHISTORY WHERE INSTR('KEE-TPX-APX-HOL-DMR-SAX-OSA-WOX-GGX-PID', TRACK) > 0
AND INTSURFACE <= 3
AND SFSHIFT >= 4
AND SFSHIFT <= 7


-jp

.


~Edited by: jeff  on:  5/23/2010  at:  12:58:01 PM~

Reply
Reply

Copyright © 2018 JCapper Software              back to the JCapper Message Board              www.JCapper.com