For the following tables (I've used ** to indicate the parts of the primary keys)
Team (*tid*, name)
Game (*gid*, tid, name, year)
Member (*mid*, name)
MemberOf (*mid*, *tid*, startyear, endyear, position)
I need to Show The History of each Striker (position) If startyear is NULL use the year from the earliest game for that player for that team Result: Striker Name, Team Name, Start Year, End Year Sorted by the Strikers name, then the start year
Whilst I have a solution I dont think it very efficient The Execution plan on infers a node cost of 28. Was Hoping for improvement suggestions and explanations?