Vince Teachout wrote:
> Well, Here's one way:
>
> SELECT rider, SUM(nscore) as totscore FROM foobar GROUP BY rider INTO 
> CURSOR totcurs nofilter
>
> SELECT Foobar.Rider, Foobar.Ddate, Foobar.Nscore, totcurs.totscore ;
>  FROM foobar INNER JOIN totcurs ON foobar.rider = totcurs.rider ;
>  ORDER BY 4 desc,1
>   
Hey Vince, you got me on the right track, thanks a million! Here's how I 
did it, I haven't got it into a report yet because I need some more 
inner joins to get the rider names into it, but I think it will work.

SELECT riderid, ;
    SUM(nscore) AS totscore ;
    FROM Foobar;
    GROUP BY riderid ;
    ORDER BY totscore DESC ;
    INTO CURSOR totcurs nofilter

SELECT * ;
    FROM Foobar;
    INNER JOIN totcurs ;
    ON Foobar.riderid = totcurs.riderid ;
    ORDER BY totscore DESC,1

BTW, what does the 4 do after the Order By, also the 1 after the Desc?

-- 
Regards,
Chester Friesen
Friesen Computer Company
Willows, CA



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to