|
Posted by Bryan on 05/09/06 20:15
Thanks strawberry. Doesn't help me completely. These are the tables I have.
tnumber (tournament points table) - tnumid, tid, mid, points
rollcall (meetings attended at 5 points per meeting) - rcid, month, year,
mid, here
I want to get the points total - 2 lowest when there's 4 or more tournaments
complete, and add meeting points, then sort by best down. Any ideas?
Here's what I have to start with...
SELECT mid,SUM(points)-MIN(points) as total FROM tnumbers GROUP BY mid ORDER
BY total desc
This gets me total points minus the lowest score but then I have to get the
meeting points seperately. I probably need to just add them all to a table
and then sort by best desc. But I would still need to get the bottom 2
scores out instead of just the lowest one.
Thanks...
"strawberry" <zac.carey@gmail.com> wrote in message
news:1147166431.801980.102930@e56g2000cwe.googlegroups.com...
> Look at Bill Karwin's answer to a similar sounding problem over at:
>
> http://groups.google.com/group/comp.databases.mysql/browse_thread/thread/ca7a0470999833fd
>
[Back to original message]
|