MAX and Top Record queries

baseball

Board Regular
Joined
Apr 1, 2002
Messages
153
My question concerns queries to select leaders (playerID) in various baseball categories on a yearly basis. In other words, I want a listing of the player or players who had the MAX number of home runs (HR) in 1901, 1902.... These need to be separated by league (AL or NL)

TABLE: Batting
Fields: playerID, year, team, league, HR (examples: aarohe001/1963/ATL/NL/44)..among other categories

One complication is that a player may be played for two or more teams in any given season would have separate listings for each team for that season, which means that I would need to sum each player's stats for every season.

A further complication is that the traded player may have switched leagues, in which case I don't want to sum his yearly totals.

Secondly, I would like to be able to expand this query to return a player's rank in the top team by year and league in a category.

By way of explanation, there are a couple of rough estimators when looking at a player's Hall of Fame potential, the Black-Ink Test and the Gray-Ink Test. The first awards points for leading the league in certain categories and the second recognizes the fact that some don't lead the league but place highly year after year.

I don't write SQL, using Access 2007's Query Design Too instead, but I can use SQL.
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Cliff it sounds as though you would create a query in the normal way, you can look at ratings in the properties, but the extra thing you may want to consider is using a report, in the report you can set Groupings to a number of levels, see if that will help.

Trevor G
 
Upvote 0

Forum statistics

Threads
1,221,889
Messages
6,162,624
Members
451,778
Latest member
ragananthony7911

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top