Race date - historical

0 votes
Apologies in advance, as I'm sure someone has asked and answered this before.

I cannot find the date when a race occurred in the historic_runners table, unless I assume it is the loaded_at column.

How can I determine the date for any given race?
asked Mar 24 in Smartform by jnestor3 Plater (120 points)

1 Answer

0 votes
Hi - this is achieved by joining with historic races with hiistoric_runners using the race_id, so that meeting date (which is the date of the race) is used in the query and/or shown in the select statement.

There are several examples in the old manual (which can be downloaded at the smartform_resources page), but as an example, to retrieve summary results for all yesterday's cards, ordered by course, time and finish position you could use the following query:

> select meeting_date, scheduled_time, race_id, course, name, finish_position from historic_races_beta join historic_runners_beta using (race_id) where meeting_date=curdate()-1 order by course, scheduled_time, finish_position;
answered Mar 26 by colin Frankel (16,100 points)
...