SQL Examples for Simple Systems

+1 vote
Just thought I would share a simple system I have been using with the smartform database and would be great if others could share some more.

The below system shows horses that won LTO and are running again within 7 days (Basically ahead of the Handicapper)

SQL :

select daily_races.course, daily_races.scheduled_time, daily_runners.name, daily_runners.form_figures,
 CONVERT(SUBSTRING(daily_runners.form_figures,-1),UNSIGNED INTEGER) AS LTO_Place, daily_runners.days_since_ran
 from daily_runners
join daily_races on daily_runners.race_id=daily_races.race_id
where meeting_date = '2017-09-06' AND daily_runners.days_since_ran < 8 AND CONVERT(SUBSTRING(daily_runners.form_figures,-1),UNSIGNED INTEGER) = 1
asked Sep 6, 2017 in Smartform by MineshShah Handicapper (510 points)

1 Answer

0 votes
Thanks for this.  It's .a good idea - we'll work on creating a separate part of the site or wiki where more systems can be added like this and keep members posted
answered Sep 17, 2017 by coltest Listed class (2,780 points)
...