support avg
SELECT
L_RETURNFLAG,L_LINESTATUS,
SUM(L_QUANTITY),SUM(L_EXTENDEDPRICE),SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)),SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)*(1+L_TEX)),
avg(L_QUANTITY),avg(L_EXTENDEDPRICE),avg(L_DISCOUNT) ,
count(*)
FROM LINEITEM  
GROUP BY L_RETURNFLAG,L_LINESTATUS 
ORDER BY L_RETURNFLAG,L_LINESTATUS;