码迷,mamicode.com
首页 > 其他好文 > 详细

2016-05-10 ABAP GROUP BY、HAVING、ORDER BY

时间:2016-05-10 12:27:40      阅读:1379      评论:0      收藏:0      [点我收藏+]

标签:

简介:ABAP中GROUP BY、HAVING、ORDER BY的使用方法

DATA :g_carrid TYPE sflight-carrid,
      g_connid TYPE sflight-connid,
      g_paymentsum TYPE i.

SELECT carrid connid AVG( paymentsum )
  INTO (g_carrid,g_connid,g_paymentsum)
  FROM sflight
  GROUP BY carrid connid
  HAVING AVG( paymentsum ) > 1000 "having 条件
  ORDER BY connid DESCENDING."DESCENDING 降序 ASCENDING 升序
  WRITE:/,g_carrid,g_connid,g_paymentsum.
ENDSELECT.

2016-05-10 ABAP GROUP BY、HAVING、ORDER BY

标签:

原文地址:http://www.cnblogs.com/liuadou/p/5477283.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!