Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Group by clause

Hi,

First of all pardon me for this silly query.

I am getting some strange output.

Input:

COL1COl2MATNR
TECH111A11111MATERAL1
TECH111 A11112MATERAL2
TECH111A11112MATERAL3
TECH111A11113MATERAL4
TECH111A11113MATERAL5
TECH112A11114MATERAL6
TECH112A11115MATERAL7
TECH112A11116MATERAL8

Query:

select "COL1",max("COl2") from "BEST"."matnr_count"

group by "COL1";

Expected Output:

COL1               COL2    

TECH111         A11113

TECH112         A11116

Output Coming:

COL1               COL2

TECH111          A11113

TECH111          A11112

TECH112          A11116



BR

Sumeet

Tags:
Not what you were looking for? View more on this topic or Ask a question