Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Doubt in GROUP By clause

$
0
0

Hi All,

 

I am new to HANA and trying out various sql queries to check the functions of the same. I executed one query and i got the result. The issue is when i "GROUP BY" on the same where condition the result is not coming.

 

 

 

select vbeln, doc_cat, doc_type , val1,val2 , order_qty,trgt_qty from <the model> where doc_cat = 'G' and order_qty <> 0 and trgt_qty <> 0.

 

For the above select query , i am able to get the output [ 10 rows of data]

 

select vbeln, doc_cat, doc_type ,sum( val1),sum(val2) , sum(order_qty),sum(trgt_qty) from <the model> where doc_cat = 'G' and order_qty <> 0  and trgt_qty <> 0 group by vbeln,doc_cat,doc_type ;



For the above query, the result is blank. I mean, there is no output displayed. Only the columns are displayed. If for the first query the output is displayed then the second query also there has to be an output isnt it?


Can some one help please?



Thanks,

Prem


Viewing all articles
Browse latest Browse all 8644

Trending Articles



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