简介: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.
时间: 2024-10-12 16:17:50