Ok, boys and girs...easy problem for you, hard problem for me. I need help finding out who has fastest laptime from my racing database for each track. I cannot use a subquery.
Drivers table
driver_id
drivername
LapTimes Table
driver_id
laptime
track
So the info I want to Select is drivername, laptime, track where laptime = min(laptime) for each track
So I'm stuck. I tried something with a temp table but I get lost with joins on joins and aggregates and aliases. Which brings me to my second question on a good SQL book that has good explanation and samples of building advanced queries.
Thanks
Drivers table
driver_id
drivername
LapTimes Table
driver_id
laptime
track
So the info I want to Select is drivername, laptime, track where laptime = min(laptime) for each track
So I'm stuck. I tried something with a temp table but I get lost with joins on joins and aggregates and aliases. Which brings me to my second question on a good SQL book that has good explanation and samples of building advanced queries.
Thanks