SELECT Sarptp.name, Sarptp.ssn, SUM(Sarptp.amt), Sarptp.agency; FROM ti!sarptp; GROUP BY Sarptp.ssn; ORDER BY Sarptp.namewhen I rewrite this to following:
SELECT Sarptp.name, Sarptp.ssn, SUM(Sarptp.amt), Sarptp.agency; FROM ti!sarptp; GROUP BY Sarptp.ssn, Sarptp.ti, Sarptp.name, Sarptp.agency; ORDER BY Sarptp.nameit totals my ANT right for each SSN. Can some clarify how it knows that I am trying total by SSN number vs lets say NAME (or other fields in group by clause)? Is it the order of precedence, in this instance the SSN being first field in group by? what about all the other fields in group by, does sql look at those? Sorry for asking stupid questions, I usually don't use group by in vfp 8 because they confuse me.