Hosted on SourceForge
and licensed under
Creative Commons GNU GPL.
| Alan Karben submitted this query on: February 07, 2008 1:20am EST | |
| TITLE | Get passing stats for all players from a particular team, on a game-by-game basis this season |
|---|---|
| SPORTS | American Football |
| QUERY | SELECT display_names.first_name, display_names.last_name, persons.person_key, events.event_key, events.start_date_time, american_football_passing_stats.passes_attempts, american_football_passing_stats.passes_completions, american_football_passing_stats.passes_percentage, positions.abbreviation FROM stats, teams, persons, american_football_passing_stats, display_names, events, events_sub_seasons, sub_seasons, person_event_metadata, positions WHERE teams.team_key = 'l.nfl.com-t.1' AND sub_seasons.sub_season_key = '2007_season_regular' AND events_sub_seasons.event_id = events.id AND events_sub_seasons.sub_season_id = sub_seasons.id AND stats.stat_repository_type = 'american_football_passing_stats' AND stats.stat_repository_id = american_football_passing_stats.id AND american_football_passing_stats.passes_attempts IS NOT NULL AND stats.stat_holder_type = 'persons' AND stats.stat_holder_id = persons.id AND stats.stat_coverage_type = 'events' AND stats.stat_coverage_id = events.id AND stats.context = 'event' AND display_names.entity_type = 'persons' AND display_names.entity_id = persons.id AND person_event_metadata.person_id = persons.id AND person_event_metadata.event_id = events.id AND person_event_metadata.team_id = teams.id AND person_event_metadata.position_id = positions.id |
| DESCRIPTION | person stats |
| DBs TESTED | MySQL |
| ADDITIONAL NOTES | |
"If you are loading only box scores from The Sports Network without having loaded the season/team schedules, this query will not work because the box scores don't load season info into the database."