Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Group by clause

$
0
0

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


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>