×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi Art
What do you want to see if the data was like this where STY J4JK2205 for TWO different classes has the same qty?
STY CLS sumqty
J4JK2205 3 17
J4JK2205 4 17
J4LW2700 3 21
J4LW2700 4 106
J4LW2701 4 31
J7GM0558 1 2
J7GM0558 4 6
J7GM0623 6 4
J7JE0101 4 5
J7RC2521 1 49
J7RC2521 4 11

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Art Tostaine, Jr.
Sent: Wednesday, May 30, 2018 9:13 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: [EXTERNAL] Re: Sql select max value question

This code returns this data. It's for a pick operation, based on the class of a style that has the m most quantity, I have to match the class to a zone in the warehouse.

select sty, cls, sum(qty) as sumqty
from whso312f
where sty <> ' '
group by sty, cls
order by sty, cls

STY CLS sumqty
J4JK2205 3 17
J4JK2205 4 4
J4LW2700 3 21
J4LW2700 4 106
J4LW2701 4 31
J7GM0558 1 2
J7GM0558 4 6
J7GM0623 6 4
J7JE0101 4 5
J7RC2521 1 49
J7RC2521 4 11

I want to get this: If qty is in the query that's ok.

STY CLS
J4JK2205 3
J4LW2700 4
J4LW2701 4
J7GM0558 4
J7GM0623 6
J7JE0101 4
J7RC2521 1
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.