I have 3 tables, league, game, and line. For the sake of this post, lets say the tables are structured as follows.
league
idleague, leaguename, misc league info
game
idgame, idleague, misc game info
line
timestamp, idgame, misc line info
I have a script that inserts data into the database every minute or so and uses the timestamp field. I want a select statement that will get the rows from the most recent timestamp, and trace back to the league table and return the leaguename of the leagues that were updated. Does that make sense? It sounds confusing even as I write it.