12-10-2008, 04:05 AM | #1 | ||
Morgado's Favorite Forum Fascist
Join Date: Oct 2000
Location: Greensboro, NC
|
Help on streamlining a query in MySQL
I'm trying to look at some era comparisons in FOF. I'm wanting to start with something basic: player ypa for a season versus league-wide ypa for the season. The idea here is that if a guy gets ypa above the league-wide average, he gets a score over 100. It it's below the league-wide average, his score is under 100. Here's the query I created (not certain if this *should* work, even...)
Code:
It has been running for 10 minutes already, on a relatively fast server. That seems excessive, and I suspect that it's because of something I did wrong there in the nesting. Li'l help?
__________________
The media don't understand the kinds of problems and pressures 54 million come wit'! |
||
12-10-2008, 06:40 AM | #2 |
assmaster
Join Date: Feb 2001
Location: Bloomington, IN
|
You need a better join between s and s1 than just Year. Those are pass attempts by player, right? Since you're summing everything, I'd think you'd want year and playerid.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|