ArtNo Week
| A1 | 2 | ||
| A2 | 2 | ||
| A3 | 2 | ||
| A4 | 1 | ||
| A4 | 4 | ||
| A3 | 6 | ||
| A5 | 6 | ||
Result should be
| A1 | 2 | ||
| A2 | 2 | ||
| A3 | 6 | ||
| A4 | 4 | ||
| A5 | 6 |
In the result rowsets I need distinct ArtNo with there Max WEEk.
NEED HELP...
| A1 | 2 | ||
| A2 | 2 | ||
| A3 | 2 | ||
| A4 | 1 | ||
| A4 | 4 | ||
| A3 | 6 | ||
| A5 | 6 | ||
| A1 | 2 | ||
| A2 | 2 | ||
| A3 | 6 | ||
| A4 | 4 | ||
| A5 | 6 |
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 16, 2013, 2:20 AM EDT
SELECT ARTNO,MAX(WEEK) AS WEEK FROM TABLENAME GROUP BY ARTNO
Kiran Kumar TalikotiRank #814 · 2.8K reputationPosted Oct 16, 2013, 2:23 AM EDT
from Table_Name
group by artno
Ravi ShekharRank #673 · 3.6K reputationPosted Oct 16, 2013, 2:45 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 16, 2013, 3:02 AM EDT