ABAP CDS ON HANA-(7)CDSビューでの集約
2024-08-27 07:19:19
Aggregate expression in CDS View
An aggregate expression calculates a single value from an operand operand by calling an aggregate function from multiple rows of a results set. They need Group By clause to aggregate values from multiple rows and the non-aggregated fields are specified in the GROUP BY clause.
Aggregate Functions:
Created a CDS view with below select with SUM function.
@AbapCatalog.sqlViewName: ‘ZFLIGHT_VW’
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: ‘Flight View with Aggregation Operation’
define view Zflight_View
as select from sflight
{
key sflight.carrid,
key sflight.connid,
sum( price ) as Total_Amount,
sflight.currency
} group by carrid, connid, currency
Data Preview:
CDS view with SUM & COUNT functions
@AbapCatalog.sqlViewName: ‘ZFLIGHT_VW’
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: ‘Flight View with Aggregation Operation’
define view Zflight_View
as select from sflight
{
key sflight.carrid,
key sflight.connid,
sum( price ) as Total_Amount,
sflight.currency,
count( *) as Lines
} group by carrid, connid, currency
Data Preview
SFLIGHT Table contents
最新文章
- springboot Serving Web Content with Spring MVC
- 微信公众平台自定义菜单及高级接口PHP SDK
- poj1160 post office
- 基于opencv的人脸检测的web应用
- Hadoop上路-02_Hadoop FS Shell
- Virtualbox - Fatal: Could not read from the boot medium; system halted!
- Linux下更新瑞芯微固件
- SpringMVC静态文件(图片)访问+js访问 简单小例子
- 与众不同 windows phone (10) - Push Notification(推送通知)之推送 Tile 通知, 推送自定义信息
- MonkeyRunner 实现自动点击截屏后与本地图库进行对比输出
- RestTemplate.getForObject返回List的时候处理方式
- APP测试常用工具以及框架
- FuzzScanner 信息收集小工具
- Python图像处理之图片文字识别(OCR)
- js异步编程终级解决方案 async/await
- mysql练习----Using Null
- [转帖]SSH 的 三种代理功能.
- UDP,TCP的套接字编程的Python实现
- Linux第二章读书笔记
- Python 数据类型:字典
热门文章
- spring-4.3.16+xfire-spring-1.2.6版本升级
- IOS MapKit框架的使用(专门用于地图显示)
- 战神CPU计算机硬件组装
- 2018.11.28 OGNL表达式与struts2框架结合的体现---在配置文件中体现(补充)
- c++ 单引号和双引号
- WebNotes(PHP、css、JavaScript等)
- 【洛谷P1367】蚂蚁
- 前端静态文件如何应对HTTPS的到来
- 买手机时几GB+几GB啥意思
- Oracle闪回恢复误删除的表、存储过程、包、函数...