progress 中的break by 以及first-of
来源:互联网 发布:ubuntu net tools 编辑:程序博客网 时间:2024/05/20 05:56
以下操作只针对于数据库中含有相应的表和字段,若要自己练习,可根据情况修改
1.在不含break by 情况下查找数据库中数据
for each xmptt_mstr :
display xmptt_pdl xmptt_tt .end.
|生产线 Take Time|
|------------------ ------------|
|pl00 5.0|
|pl01 4.0|
|pl02 45.0|
|pl17 5.0|
|pl19 5.0|
|pl23 5.0|
|pl33 4.0|
| |
--------------------------------------------------------------------------------
2.在含有break by情况下查找数据库
for each xmptt_mstr break by xmptt_tt : /*progress中默认是升序*/
display xmptt_pdl xmptt_tt .
end.
+-------------------------------+
|生产线 Take Time|
|------------------ ------------|
|pl01 4.0|
|pl33 4.0|
|pl00 5.0|
|pl17 5.0|
|pl19 5.0|
|pl23 5.0|
|pl02 45.0|
| |
--------------------------------------------------------------------------------
3.含有break by 且降序排列,每一个by 就是一次排序
for each xmptt_mstr break by xmptt_tt by xmptt_pdl desc: /*desc 降序,当不写desc时,系统默认为升序*/
display xmptt_pdl xmptt_tt .
end.
+-------------------------------+
|生产线 Take Time|
|------------------ ------------|
|pl33 4.0|
|pl01 4.0|
|pl23 5.0|
|pl19 5.0|
|pl17 5.0|
|pl00 5.0|
|pl02 45.0|
| |
--------------------------------------------------------------------------------
4.含有break by 和 first-of 以及 降序排列,并计算以xmptt_tt排列的相同数据求和
define variable a as int .
define variable b as int .
b = 0 .
for each xmptt_mstr break by xmptt_tt by xmptt_pdl desc:
if first-of(xmptt_tt) then do :
a = 0 .
b = b + 1 .
message b.
end.
a = a + xmptt_tt .
display a xmptt_pdl xmptt_tt .
end.
+------------------------------------------+
| a 生产线 Take Time|
|---------- ------------------ ------------|
| 4 pl33 4.0|
| 8 pl01 4.0|
| 5 pl23 5.0|
| 10 pl19 5.0|
| 15 pl17 5.0|
| 20 pl00 5.0|
| 45 pl02 45.0|
| |
--------------------------------------------------------------------------------
5.含有break by 和 first-of 以及 降序排列,并计算以xmptt_pdl排列的相同数据求和
define variable a as int .
define variable b as int .
b = 0 .
for each xmptt_mstr break by xmptt_tt by xmptt_pdl desc:
if first-of(xmptt_pdl) then do :
a = 0 .
b = b + 1 .
message b.
end.
a = a + xmptt_tt .
display a xmptt_pdl xmptt_tt .
end.
| a 生产线 Take Time|
|---------- ------------------ ------------|
| 4 pl33 4.0|
| 4 pl01 4.0|
| 5 pl23 5.0|
| 5 pl19 5.0|
| 5 pl17 5.0|
| 5 pl00 5.0|
| 45 pl02 45.0|
| |
- progress 中的break by 以及first-of
- 【WPF】The example of progress bar, label status changed by background worker
- LWUIT中的进度条实现(Progress Indicator & Threads In LWUIT by Shai Almog)
- progress中的数据库访问
- bootstrap中的 progress bar
- bootstrap中的 progress bar
- Python中的循环以及break/continue/else/pass
- Python中的循环以及break/continue/else/pass
- life of progress to myself
- Update Progress(Time of error)
- 关于oracle中的group by、having以及order by
- Progress 和 Thread 以及 Module
- first program by c
- First Blood By Now
- jQuery中的小知识:first-child和first-of-type的区别
- Update Progress(Time of error)问题
- The install progress of bochs 2.4.6
- The progress of abstraction (抽象过程)
- zoj3204 connect them 最小生成树 暴力
- JQuery实现浏览器的滚动条滚动到底部后加载数据
- ubuntu14.04TSL安装tar.gz的flash
- 字符串转换
- hdu 1220 Cube(规律+公式)
- progress 中的break by 以及first-of
- 日语敬语(自谦语 郑重语 尊他语)详解
- Http请求工具类
- Intellij IDEA 14.1.4 Scala开发环境搭建
- Java多线程编程中Future模式的详解
- 劳动能力丧失的类型和程度
- 手机端如何阻止苹果浏览器输入框默认放大事件
- 大数据时代到来如何构建国家地质基础数据更新体系
- uva 122 Trees on the level