fishing tournament point standings

fishing tournament point standings

am 09.05.2006 02:31:21 von Bryan

I'm trying to pull all the data fom the tournament table, using 2 dropped
tournaments, add to the total per angler meeting points from the meetings
table.
Anyone have any clues? Right now I can get the total with 1 drop using (-
MIN(tpoints))

Thanks...

Re: fishing tournament point standings

am 09.05.2006 11:20:31 von zac.carey

Look at Bill Karwin's answer to a similar sounding problem over at:

http://groups.google.com/group/comp.databases.mysql/browse_t hread/thread/ca7a0470999833fd

Re: fishing tournament point standings

am 09.05.2006 19:15:29 von Bryan

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" 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_t hread/thread/ca7a0470999833fd
>

Re: fishing tournament point standings

am 10.05.2006 02:22:47 von nc

Bryan wrote:
>
> I'm trying to pull all the data fom the tournament table,
> using 2 dropped tournaments, add to the total per angler
> meeting points from the meetings table.

Since you didn't say anything about the table structure, I had to make
up field names. If I made them up correctly, this should work:

SELECT SUM(points) AS total_points FROM tournament
GROUP BY angler
ORDER BY total_points DESC;

Cheers,
NC

Re: fishing tournament point standings

am 11.05.2006 15:03:39 von Bryan

Well, I've got 2 tables so the solution below is missing just a bit. I've
added the structure since my original message..

Here's the structure...

tnumbers table: tid, mid, points
rollcall table: mid, here

I would like to list all tournaments now, along with the total amount of
meeting points (here*10), with the total of all tournaments plus the meeting
points.

Thanks...

--

...Bryan Cotter..
Texas Hawgs Guide Service - http://texashawgs.com
...512-762-0190..


"NC" wrote in message
news:1147220567.167023.111710@g10g2000cwb.googlegroups.com.. .
> Bryan wrote:
>>
>> I'm trying to pull all the data fom the tournament table,
>> using 2 dropped tournaments, add to the total per angler
>> meeting points from the meetings table.
>
> Since you didn't say anything about the table structure, I had to make
> up field names. If I made them up correctly, this should work:
>
> SELECT SUM(points) AS total_points FROM tournament
> GROUP BY angler
> ORDER BY total_points DESC;
>
> Cheers,
> NC
>