I'm searching a baseball database stat database, trying to determine who are the rookies. The database contains a record for each year a player has been in the league. So a player in the league for five years has five records, each of the five records has the same Player_ID but a different SEASON number. I'm trying retrieve the Player_IDs for all the rookies - which are those players with only a record for the current season and no other season records. Therefore, I want to retrieve those Player_IDs that have only a single season record. Any idea how this can be done efficiently?
I'm trying to avoid doing a database query for each player_ID and then determining if there was more than one season record returned - that seems awfully inefficient. Is there a way to do it in one query.
Thanks
Dan