Question

I want to query on a table keeping few fields as disctict. So, I use group by on the fields to be distinct. BUt HANA system throws an error: Not A Group By expression

select "REFID", "ORGID_WE", "ARTIKLE", "ORGID", "HELLER", "WERT", "BZBAS_AW" 
from "SYSTEM"."SOFT"
GROUP BY "REFID", "ORGID_WE", "ARTIKLE", "ORGID", "HELLER" ;

For me this looks good. Any ideas??

Était-ce utile?

La solution

try using aggregate functions:

select "REFID", "ORGID_WE", "ARTIKLE", "ORGID", "HELLER", sum("WERT"), sum("BZBAS_AW")
from "SYSTEM"."SOFT"
GROUP BY "REFID", "ORGID_WE", "ARTIKLE", "ORGID", "HELLER" ;
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top