RE: Problem with GROUP BY

Author: jerry foote

Posted: 2016-02-22 at 14:15:43

-----Original Message-----

From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Gene Wirchenko

Sent: Monday, February 22, 2016 2:08 PM

To: ProFox Email List

Subject: RE: Problem with GROUP BY

At 13:06 2016-02-20, "jerry foote" <jerryf@footegroup.com> wrote:

>Thanks for all the feed back on the group by clause.

>This what I ended up with

>

>SELECT service.manifest_n, service.bill_of_la, service.release_no,

>service.frm_acct, service.source,; service.source_id,

>sum(service.units) as totat FROM SERVICE WHERE

>manifest_n=2512 ;

>AND bill_of_la="158401" GROUP BY service.manifest_n,

>service.bill_of_la, service.release_no, service.frm_acct,

>service.source,; service.source_id INTO CURSOR mytotla

Does that do what you want?

It means: For each combination of service.manifest_n,

service.bill_of_la, service.release_no, service.frm_acct, service.source,

and service.source_id in the service table, what is the total of

service.units?

[snip]

Sincerely,

Gene Wirchenko

Sure does

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/423F6EAAD7FB4C25A9B7F16A57B99F23@jerryfootePC

** 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.

©2016 jerry foote