CAD库中统计PBN运行航路条数和总距离
select 'PBN运行航路' 类型, fb.b 总条数, fa.a 总距离 from
(
select sum(s) a from (
select distinct f4.airway_point1,f4.airway_point2, f4.kilometer_distance S from airway f1, airway_segment_point f2,airway_segment_point f3, segment f4
where
f1.chart_type_id=3 and
f1.airway_id =f2.airway_id and
f1.airway_id =f3.airway_id and
f2.airway_seq=f3.airway_seq-1 and
(
(f2.airway_point_id =f4.airway_point1 and f3.airway_point_id =f4.airway_point2) or
(f2.airway_point_id =f4.airway_point2 and f3.airway_point_id =f4.airway_point1)
) and f1.airway_rnp is not null
) tm
) fa
left join
(select count(*) b from airway where airway_rnp is not null and chart_type_id=3 ) fb
on 1=1
纯PBN代号航路
select 'PBN代号航路' 类型, fb.b 总条数, fa.a 总距离 from
(
select sum(s) a from (
select distinct f4.airway_point1,f4.airway_point2, f4.kilometer_distance S from airway f1, airway_segment_point f2,airway_segment_point f3, segment f4
where
f1.chart_type_id=3 and
f1.airway_id =f2.airway_id and
f1.airway_id =f3.airway_id and
f2.airway_seq=f3.airway_seq-1 and
(
(f2.airway_point_id =f4.airway_point1 and f3.airway_point_id =f4.airway_point2) or
(f2.airway_point_id =f4.airway_point2 and f3.airway_point_id =f4.airway_point1)
) and f1.airway_type_id in (2,5,8)
) tm
) fa
left join
(select count(*) b from airway where airway_type_id in (2,5,8) and chart_type_id=3 ) fb
on 1=1
CAD库中统计PBN运行航路条数和总距离的更多相关文章
- (转)如何在Linux中统计一个进程的线程数
如何在Linux中统计一个进程的线程数 原文:http://os.51cto.com/art/201509/491728.htm 我正在运行一个程序,它在运行时会派生出多个线程.我想知道程序在运行时会 ...
- SQLSERVER中统计所有表的记录数
SQLSERVER中统计所有表的记录数 利用系统索引表sysindexes中索引ID indid<1的行中的rows列存有该表的行数这一特点. 方法是利用隐藏未公开的系统存储过程sp_MS ...
- PHP查询数据库中满足条件的记录条数(二种实现方法)
在需要输出网站用户注册数或者插入数据之前判断是否有重复记录时,就需要获取满足条件的MySQL查询的记录数目,接下来介绍两种查询统计方法,感兴趣的朋友可以了解下啊,或许对你有所帮助 在需要输出网 ...
- 2015.7.24 CAD库中列举五字代码点所属航路及终端区图,左连接的累加
select decode(fb.tupr,null,'仅航路',decode(fc.aw,null,'仅终端区','航路及终端区')) 范围,pt 五字代码点,fb.tupr 终端区图及程序,fc. ...
- CAD库中列举所有航路点
select distinct f1.airway_point_name,f1.latitude,f1.longitude,upper(f1.airway_point_type_name)type,f ...
- jmeter中一次运行多条sql语句
操作比较简单,主要就分两步: 第一步:在JDBC Connection Configuration中设置,主要见下图标注部分增加:?allowMultiQueries=true 第二步:在JDBC R ...
- MySQL数据库中统计一个库中的所有表的行数?
今天公司两个远端的数据库主从同步有点问题,查看下wordpress库下所有表的表的条目? mysql> use information_schema;Database changedmysql& ...
- 查询cad库中,所有程序leg引用的点的id,需要预先处理点表和程序表
select f1.pro_id,f1.pro_type, f1.code_fix_point, f1.code_type_fix_point, f1.code_fir,f2.code_icao,nv ...
- 如何在 Linux 中统计一个进程的线程数
编译自:http://ask.xmodulo.com/number-of-threads-process-linux.html作者: Dan Nanni原创:LCTT https://linux.cn ...
随机推荐
- 四十四 Python分布式爬虫打造搜索引擎Scrapy精讲—elasticsearch(搜索引擎)的基本查询
1.elasticsearch(搜索引擎)的查询 elasticsearch是功能非常强大的搜索引擎,使用它的目的就是为了快速的查询到需要的数据 查询分类: 基本查询:使用elasticsearch内 ...
- python协程函数应用 列表生成式 生成器表达式
协程函数应用 列表生成式 生成器表达式 一.知识点整理: 1.可迭代的:对象下有_iter_方法的都是可迭代的对象 迭代器:对象._iter_()得到的结果就是迭代器 迭代器的特性: 迭代器._n ...
- js、jq、ajax之间的关系
一句话:js是一种客户端脚本语言,jq是在js基础上封装起来的一个开发工具,ajax是基于js的一种技术(异步刷新). javascript是一种在客户端执行的脚本语言,用来给网页添加动态功能,使网页 ...
- 【ccf2017-12-2】游戏(模拟)
问题描述 有n个小朋友围成一圈玩游戏,小朋友从1至n编号,2号小朋友坐在1号小朋友的顺时针方向,3号小朋友坐在2号小朋友的顺时针方向,……,1号小朋友坐在n号小朋友的顺时针方向. 游戏开始,从1号小朋 ...
- Android自定义控件之仿美团下拉刷新
美团的下拉刷新分为三个状态: 第一个状态为下拉刷新状态(pull to refresh),在这个状态下是一个绿色的椭圆随着下拉的距离动态改变其大小. 第二个部分为放开刷新状态(release to r ...
- ViewPager实现图片轮翻效果
很多App都有这种效果,特别一些电商类的App,顶部每隔几秒钟会向右翻页显示下张图片,用来作推广或者内容展示用的.今天来简单地模仿一下,还自带一个自动跳动的小功能(底部有几个小点,图片移动的时候,点的 ...
- GitLab non-standard SSH port
/***************************************************************************** * GitLab non-standard ...
- BasicExcel的使用
from:http://www.cnblogs.com/paullam/p/3705924.html 使用的平台:vs2013 控制台 创建时需要注意, 安全开发生命周期(SDL)检查 不能勾选( ...
- 【学习】JennyHui学英语 - 生词积累
(主要是来自于普特英语) 平常积累 20140820 20140826 VOA慢速英语生词积累 2014-10-08 2014-10-11 2014-10-13 2014-10-14 2014-10- ...
- LeetCode Split Array into Consecutive Subsequences
原题链接在这里:https://leetcode.com/problems/split-array-into-consecutive-subsequences/description/ 题目: You ...