+1 vote

Is there a Smartform query that allows me to see any horse that has more than one entry on any given day's racing?

in Smartform by betwise1 Novice (450 points)

1 Answer

+1 vote
 
Best answer
When daily_runners sometimes contain horses that have been left in at the declaration stage for more than one race you can find out which horses are double entered and display details of the races as follows:

> select name,count(*), scheduled_time, course as declarations from daily_runners join daily_races using (race_id) where meeting_date=CURDATE() group by name having declarations > 1;

You should change CURDATE() as needed according to the meeting_date that you want to look up.
by colin Frankel (19.7k points)
...