Windowing Functions Exercises

So, using the Lahman’s baseball database – found here – let’s go thru some practice exercises to try out your new windowing functions skills:

  1. Find the first year that each park was played in
  2. Show the rank with ties (both ways) of the games started in 1983 for each league for all players
  3. Place the players into 5 distinct buckets that were up for election into the Hall of Fame in 2001
  4. I would like to see the rolling totals and reverse rolling totals of the number of games Dale Murphy played for each team during his storied career.
  5. Let’s see the number of home runs hit by Chipper Jones in each of his historic seasons, as well as the number of home runs he hit the previous season as well as what he would hit the next season

Once you’re ready with your answers, you can check them here.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s