本节的例子会说明一些里程碑特性和一些我们以前没有机会查看的查询。随着时间的推移,这些查询可能会移到本书的其它的小节。
The examples in this section demonstrate a few miscellaneous features and queries that we have
not yet had a chance to examine. Over time, these queries should probably be moved to other
sections of the book.
5.15.1. 在一个is步骤中进行计算 Using a calculation inside of an is step
在一个is步骤内使用一些数据表达式是可以的。有时这个功能很方便。下面的例子把500/2做为了测试的一部分。当然您常常只会输入250.但是在这是为了说明这项能力。
It is possible to use a mathematical expression inside of an is step. At times this comes in quite
handy. The example below simply divides 500 by 2 as part of a test. Clearly you would normally just
enter 250 but this shows the capability.
 

 

把这个功能和变量一起使用,这个功能会更加有趣。

The capability becomes more interesting when used in conjunction with a variable.
 

 

又一个例子,我们从设定变量a的值开始。它的值表示的是从某个机场出长最大的路径数。然后我们用一个查询来找出来所有的机场它的机最大出边的数量要大于a-50. 

Here is one more example where we start by setting the variable a to the value that represents the
maximum number of routes from any single airport. The we use a query to find all the airports that
have at least as many outgoing routes as 50 fewer than our value a.

 

 

posted on 2022-04-30 12:03  bokeyuannicheng0000  阅读(9)  评论(0)    收藏  举报