Query Library

Casey Trauer submitted this query on: January 30, 2009 6:58pm EST
TITLE Motor racing results
SPORTS Motor Racing
QUERY SELECT pe.rank, dn.full_name, p.person_key, mres.lap, mres.laps_remaining
FROM participants_events pe
JOIN events e ON pe.event_id = e.id
JOIN display_names dn ON pe.participant_id = dn.entity_id
JOIN persons p ON pe.participant_id = p.id
JOIN motor_racing_event_states mres ON mres.event_id = e.id
WHERE e.event_key = 'l.nascar.com.nextel-2007-e.687'
AND dn.entity_type = 'persons'
ORDER BY pe.rank + 1;
DESCRIPTION Returns a listing of race leaders and race status for a given event key.
DBs TESTED MySQL
ADDITIONAL NOTES Data from the Sports Network contains the top 10 drivers mid-race and a full listing of drivers post-race. Post-race data has more information, such as points earned.
Your log.directory config setting does not point to a writable directory.