| Bug #22965 | Feature request: WEIGHTED_AVG | ||
|---|---|---|---|
| Submitted: | 3 Oct 2006 23:15 | Modified: | 4 Oct 2006 12:33 |
| Reporter: | Jason Miele | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S4 (Feature request) |
| Version: | OS: | ||
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Weighted Average | ||
[3 Oct 2006 23:15]
Jason Miele
[3 Oct 2006 23:27]
Jason Miele
WEIGHTED_AVG = (weight1*value1 + weight2*value2 + weight3*value3 + ... + weightX*valueX) / X X = rowcount
[3 Oct 2006 23:32]
Jason Miele
Nevermind, I figured it out... SUM(quantity*weight)/SUM(quantity) Please close this feature request thx
[4 Oct 2006 12:33]
Valeriy Kravchuk
Closed as reporter solved the problem with already existing features.
